Browse code

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)
(cherry picked from commit 6516699e46bd912de3b65d4cc4eb668e919e845e)
(cherry picked from commit 350f605f123cf30942a02576d6a4ffb2bb615bf0)

Daniel-Constantin Mierla authored on 03/12/2015 12:24:40
Showing 1 changed files
... ...
@@ -1836,7 +1836,7 @@ int fix_all_socket_lists()
1836 1836
 #ifdef __OS_linux
1837 1837
 		&&  (!auto_bind_ipv6 || add_interfaces_via_netlink(0, AF_INET6, 0, PROTO_UDP, &ai_lst) == 0)
1838 1838
 #else
1839
-		&& ( !auto_bind_ipv6 || add_interfaces(0, AF_INET6, 0,  PROTO_UDP, &ai_lst) !=0 ) /* add_interface does not work for IPv6 on Linux */
1839
+		&& ( !auto_bind_ipv6 || add_interfaces(0, AF_INET6, 0,  PROTO_UDP, &ai_lst) ==0 ) /* add_interface does not work for IPv6 on Linux */
1840 1840
 #endif /* __OS_linux */
1841 1841
 			 ) && (addr_info_to_si_lst(ai_lst, 0, PROTO_UDP, 0, &udp_listen)==0)){
1842 1842
 			free_addr_info_lst(&ai_lst);