fix Linux AF_INET iteration segfault

Prevent segfault when WireGuard is active and an interface has `ifaptr->ifa_addr == NULL`
pull/206/head
Jim Tittsler 4 years ago committed by GitHub
parent 2a67aa7138
commit f8644e1f1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -790,7 +790,7 @@ bool CReflector::UpdateListenMac(void)
for ( ifaptr = ifap; (ifaptr != NULL) && !found; ifaptr = (ifaptr)->ifa_next )
{
// is it an AF_INET?
if ( ifaptr->ifa_addr->sa_family == AF_INET )
if ( ifaptr->ifa_addr && ifaptr->ifa_addr->sa_family == AF_INET )
{
if (ifaptr->ifa_addr == NULL)
continue;

Loading…
Cancel
Save

Powered by TurnKey Linux.