[sr-dev] git:4.3:6516699e: core: proper test of return code for add_interfaces() in case of IPv6

Daniel-Constantin Mierla miconda at gmail.com
Thu Dec 17 09:39:30 CET 2015


Module: kamailio
Branch: 4.3
Commit: 6516699e46bd912de3b65d4cc4eb668e919e845e
URL: https://github.com/kamailio/kamailio/commit/6516699e46bd912de3b65d4cc4eb668e919e845e

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2015-12-17T09:34:25+01:00

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

- report with patch by Christian Kühnke

(cherry picked from commit 299d2f7764527fbc5b6de1833976f43c58b1ff2d)

---

Modified: socket_info.c

---

Diff:  https://github.com/kamailio/kamailio/commit/6516699e46bd912de3b65d4cc4eb668e919e845e.diff
Patch: https://github.com/kamailio/kamailio/commit/6516699e46bd912de3b65d4cc4eb668e919e845e.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