Module: kamailio
Branch: 4.4
Commit: 4992dfbb9f15cfb8ade99be4e6d3087146cb8e22
URL:
https://github.com/kamailio/kamailio/commit/4992dfbb9f15cfb8ade99be4e6d3087…
Author: schoberw <walter.schober(a)neotel.at>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-04-01T11:23:03+02:00
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
(cherry picked from commit d7fca53e8c5409849ec044098a143e7254129c00)
---
Modified: socket_info.c
---
Diff:
https://github.com/kamailio/kamailio/commit/4992dfbb9f15cfb8ade99be4e6d3087…
Patch:
https://github.com/kamailio/kamailio/commit/4992dfbb9f15cfb8ade99be4e6d3087…
---
diff --git a/socket_info.c b/socket_info.c
index d06fdcf..1d28977 100644
--- a/socket_info.c
+++ b/socket_info.c
@@ -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)