Browse code

core: different logging for IPv4 and IPv6 for socket option setting

Henning Westerholt authored on 14/08/2022 09:01:57
Showing 1 changed files
... ...
@@ -336,13 +336,13 @@ int udp_init(struct socket_info* sock_info)
336 336
 	if (addr->s.sa_family==AF_INET){
337 337
 		if(setsockopt(sock_info->socket, SOL_IP, IP_RECVERR,
338 338
 					(void*)&optval, sizeof(optval)) ==-1){
339
-			LM_ERR("setsockopt: %s\n", strerror(errno));
339
+			LM_ERR("IPV4 setsockopt: %s\n", strerror(errno));
340 340
 			goto error;
341 341
 		}
342 342
 	} else if (addr->s.sa_family==AF_INET6){
343 343
 		if(setsockopt(sock_info->socket, SOL_IPV6, IPV6_RECVERR,
344 344
 					(void*)&optval, sizeof(optval)) ==-1){
345
-			LM_ERR("setsockopt: %s\n", strerror(errno));
345
+			LM_ERR("IPv6 setsockopt: %s\n", strerror(errno));
346 346
 			goto error;
347 347
 		}
348 348
 	}
... ...
@@ -354,7 +354,7 @@ int udp_init(struct socket_info* sock_info)
354 354
 		optval= (pmtu_discovery) ? IP_PMTUDISC_DO : IP_PMTUDISC_DONT;
355 355
 		if(setsockopt(sock_info->socket, IPPROTO_IP, IP_MTU_DISCOVER,
356 356
 				(void*)&optval, sizeof(optval)) ==-1){
357
-			LM_ERR("setsockopt: %s\n", strerror(errno));
357
+			LM_ERR("IPv4 setsockopt: %s\n", strerror(errno));
358 358
 			goto error;
359 359
 		}
360 360
 	} else if (addr->s.sa_family==AF_INET6){
... ...
@@ -365,7 +365,7 @@ int udp_init(struct socket_info* sock_info)
365 365
 		if(setsockopt(sock_info->socket, IPPROTO_IPV6,
366 366
 				IPV6_MTU_DISCOVER,
367 367
 				(void*)&optval, sizeof(optval)) ==-1){
368
-			LM_ERR("setsockopt: %s\n", strerror(errno));
368
+			LM_ERR("IPv6 setsockopt: %s\n", strerror(errno));
369 369
 			goto error;
370 370
 		}
371 371
 	}