diff -ur a/src/netstatus-iface.c b/src/netstatus-iface.c --- a/src/netstatus-iface.c 2007-02-13 09:39:19.000000000 +0000 +++ b/src/netstatus-iface.c 2007-07-16 00:03:02.000000000 +0100 @@ -1122,9 +1122,10 @@ } #if !defined(HAVE_SOCKADDR_SA_LEN) -#define NETSTATUS_SA_LEN(saddr) (sizeof (struct sockaddr)) +#define NETSTATUS_IFREQ_LEN(ifr) (sizeof (struct ifreq)) #else -#define NETSTATUS_SA_LEN(saddr) (MAX ((saddr)->sa_len, sizeof (struct sockaddr))) +#define NETSTATUS_IFREQ_LEN(ifr) sizeof (ifr->ifr_name) + \ + (MAX (ifr->ifr_addr.sa_len, sizeof (struct sockaddr))) #endif /* HAVE_SOCKADDR_SA_LEN */ /* Taken From R. Stevens Unix Network Programming Vol. 1. @@ -1220,7 +1221,7 @@ struct ifreq *if_req = (struct ifreq *) p; gboolean loopback = FALSE; - p += sizeof (if_req->ifr_name) + NETSTATUS_SA_LEN (&if_req->ifr_addr); + p += NETSTATUS_IFREQ_LEN (if_req); if (ioctl (fd, SIOCGIFFLAGS, if_req) < 0) {