Browse code

core: skip address family AF_PACKET on -l iface_name

- socket_info.c: getifaddrs() returns AF_PACKET, AF_INET and AF_INET6 addressed of an interface.
AF_PACKET are of no use and breaks startup with an -l eth0:5060 cmd line param

schoberw authored on 01/04/2016 08:34:11
Showing 1 changed files
... ...
@@ -1205,6 +1205,9 @@ int add_interfaces(char* if_name, int family, unsigned short port,
1205 1205
 
1206 1206
 	for (ifa = ifap; ifa; ifa = ifa->ifa_next)
1207 1207
 	{
1208
+		/* skip AF_PACKET addr family since it is of no use later on */
1209
+		if (ifa->ifa_addr->sa_family == AF_PACKET)
1210
+			continue;
1208 1211
 		if (if_name && strcmp(if_name, ifa->ifa_name))
1209 1212
 			continue;
1210 1213
 		if (family && family != ifa->ifa_addr->sa_family)