Module: kamailio
Branch: master
Commit: 8543993e1f702aef80887c0e72b9bf67c62c1617
URL: https://github.com/kamailio/kamailio/commit/8543993e1f702aef80887c0e72b9bf6…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-04-01T11:10:46+02:00
core: test if AF_PACKET is defined at compile time
- mac os x (and perhaps *BSDs) doesn't have it
---
Modified: socket_info.c
---
Diff: https://github.com/kamailio/kamailio/commit/8543993e1f702aef80887c0e72b9bf6…
Patch: https://github.com/kamailio/kamailio/commit/8543993e1f702aef80887c0e72b9bf6…
---
diff --git a/socket_info.c b/socket_info.c
index 1d28977..cecfef9 100644
--- a/socket_info.c
+++ b/socket_info.c
@@ -1205,16 +1205,18 @@ int add_interfaces(char* if_name, int family, unsigned short port,
for (ifa = ifap; ifa; ifa = ifa->ifa_next)
{
+#ifdef AF_PACKET
/* skip AF_PACKET addr family since it is of no use later on */
if (ifa->ifa_addr->sa_family == AF_PACKET)
continue;
+#endif
if (if_name && strcmp(if_name, ifa->ifa_name))
continue;
if (family && family != ifa->ifa_addr->sa_family)
continue;
sockaddr2ip_addr(&addr, (struct sockaddr*)ifa->ifa_addr);
tmp=ip_addr2a(&addr);
- if (ifa->ifa_flags & IFF_LOOPBACK)
+ if (ifa->ifa_flags & IFF_LOOPBACK)
flags = SI_IS_LO;
else
flags = SI_NONE;
Module: kamailio
Branch: master
Commit: 597bef35c74dd3beea693562f45d17e648fd5f6d
URL: https://github.com/kamailio/kamailio/commit/597bef35c74dd3beea693562f45d17e…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-04-01T11:06:47+02:00
Merge pull request #558 from schoberw/patch-2
core: skip address family AF_PACKET on -l iface_name
---
Modified: socket_info.c
---
Diff: https://github.com/kamailio/kamailio/commit/597bef35c74dd3beea693562f45d17e…
Patch: https://github.com/kamailio/kamailio/commit/597bef35c74dd3beea693562f45d17e…
---
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)
Module: kamailio
Branch: master
Commit: d7fca53e8c5409849ec044098a143e7254129c00
URL: https://github.com/kamailio/kamailio/commit/d7fca53e8c5409849ec044098a143e7…
Author: schoberw <walter.schober(a)neotel.at>
Committer: schoberw <walter.schober(a)neotel.at>
Date: 2016-04-01T10:34:11+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
---
Modified: socket_info.c
---
Diff: https://github.com/kamailio/kamailio/commit/d7fca53e8c5409849ec044098a143e7…
Patch: https://github.com/kamailio/kamailio/commit/d7fca53e8c5409849ec044098a143e7…
---
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)