Module: kamailio
Branch: 4.4
Commit: 6684be6b4c405ab24dd6a5a19267ceef6aa95503
URL:
https://github.com/kamailio/kamailio/commit/6684be6b4c405ab24dd6a5a19267cee…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-04-07T09:59:04+02:00
core: check if ifa_addr field is set while trying to skip AF_PACKET interfaces
- reported by Juha Heinanen
(cherry picked from commit 1545b8de396e8e5d0ef24c9102beff18b3cf36e5)
---
Modified: socket_info.c
---
Diff:
https://github.com/kamailio/kamailio/commit/6684be6b4c405ab24dd6a5a19267cee…
Patch:
https://github.com/kamailio/kamailio/commit/6684be6b4c405ab24dd6a5a19267cee…
---
diff --git a/socket_info.c b/socket_info.c
index cecfef9..95c6ee6 100644
--- a/socket_info.c
+++ b/socket_info.c
@@ -1207,7 +1207,7 @@ int add_interfaces(char* if_name, int family, unsigned short port,
{
#ifdef AF_PACKET
/* skip AF_PACKET addr family since it is of no use later on */
- if (ifa->ifa_addr->sa_family == AF_PACKET)
+ if (ifa->ifa_addr && ifa->ifa_addr->sa_family == AF_PACKET)
continue;
#endif
if (if_name && strcmp(if_name, ifa->ifa_name))