[sr-dev] git:master:1545b8de: core: check if ifa_addr field is set while trying to skip AF_PACKET interfaces
Daniel-Constantin Mierla
miconda at gmail.com
Wed Apr 6 18:57:11 CEST 2016
Module: kamailio
Branch: master
Commit: 1545b8de396e8e5d0ef24c9102beff18b3cf36e5
URL: https://github.com/kamailio/kamailio/commit/1545b8de396e8e5d0ef24c9102beff18b3cf36e5
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2016-04-06T18:55:57+02:00
core: check if ifa_addr field is set while trying to skip AF_PACKET interfaces
- reported by Juha Heinanen
---
Modified: socket_info.c
---
Diff: https://github.com/kamailio/kamailio/commit/1545b8de396e8e5d0ef24c9102beff18b3cf36e5.diff
Patch: https://github.com/kamailio/kamailio/commit/1545b8de396e8e5d0ef24c9102beff18b3cf36e5.patch
---
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))
More information about the sr-dev
mailing list