[sr-dev] git:master:299d2f77: core: proper test of return code for add_interfaces() in case of IPv6

Daniel-Constantin Mierla miconda at gmail.com
Thu Dec 3 13:25:48 CET 2015


Module: kamailio
Branch: master
Commit: 299d2f7764527fbc5b6de1833976f43c58b1ff2d
URL: https://github.com/kamailio/kamailio/commit/299d2f7764527fbc5b6de1833976f43c58b1ff2d

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2015-12-03T13:24:40+01:00

core: proper test of return code for add_interfaces() in case of IPv6

- report with patch by Christian Kühnke

---

Modified: socket_info.c

---

Diff:  https://github.com/kamailio/kamailio/commit/299d2f7764527fbc5b6de1833976f43c58b1ff2d.diff
Patch: https://github.com/kamailio/kamailio/commit/299d2f7764527fbc5b6de1833976f43c58b1ff2d.patch

---

diff --git a/socket_info.c b/socket_info.c
index 75d09da..678b6d8 100644
--- a/socket_info.c
+++ b/socket_info.c
@@ -1809,7 +1809,7 @@ int fix_all_socket_lists()
 #ifdef __OS_linux
 		&&  (!auto_bind_ipv6 || add_interfaces_via_netlink(0, AF_INET6, 0, PROTO_UDP, &ai_lst) == 0)
 #else
-		&& ( !auto_bind_ipv6 || add_interfaces(0, AF_INET6, 0,  PROTO_UDP, &ai_lst) !=0 ) /* add_interface does not work for IPv6 on Linux */
+		&& ( !auto_bind_ipv6 || add_interfaces(0, AF_INET6, 0,  PROTO_UDP, &ai_lst) ==0 ) /* add_interface does not work for IPv6 on Linux */
 #endif /* __OS_linux */
 			 ) && (addr_info_to_si_lst(ai_lst, 0, PROTO_UDP, 0, &udp_listen)==0)){
 			free_addr_info_lst(&ai_lst);




More information about the sr-dev mailing list