Commit 3e90c6b5 authored by pdw's avatar pdw

Fixed segfault when selecting interfaces with empty MAC address (e.g. gprs

interface on Nokia N900) - Graham Ings <>
parent f1b98473
......@@ -132,6 +132,9 @@ get_addrs_ioctl(char *interface, char if_hw_addr[], struct in_addr *if_ip_addr,
if (strcmp(ifa->ifa_name, interface))
continue; /* Not our interface. */
if (ifa->ifa_addr == NULL)
continue; /* Skip NULL interface address. */
if ( (ifa->ifa_addr->sa_family != AF_INET)
&& (ifa->ifa_addr->sa_family != AF_INET6) )
continue; /* AF_PACKET is beyond our scope. */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment