Skip to content

Commit

Permalink
core: skip address family AF_PACKET on -l iface_name
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
schoberw committed Apr 1, 2016
1 parent 130eb9b commit d7fca53
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions socket_info.c
Expand Up @@ -1205,6 +1205,9 @@ int add_interfaces(char* if_name, int family, unsigned short port,

for (ifa = ifap; ifa; ifa = ifa->ifa_next)
{
/* skip AF_PACKET addr family since it is of no use later on */
if (ifa->ifa_addr->sa_family == AF_PACKET)
continue;
if (if_name && strcmp(if_name, ifa->ifa_name))
continue;
if (family && family != ifa->ifa_addr->sa_family)
Expand Down

0 comments on commit d7fca53

Please sign in to comment.