The following patch fixes the segfault:

--- a/addrs_ioctl.c 2010-11-27 10:56:44.000000000 +0000
+++ b/addrs_ioctl.c 2011-05-07 02:16:28.000000000 +0100
@@ -132,6 +132,9 @@
         if (strcmp(ifa->ifa_name, interface))
            continue; /* Not our interface. */

+        if ( ! ifa->ifa_addr )
+           continue; /* AF_PACKET is beyond our scope. */
+
         if ( (ifa->ifa_addr->sa_family != AF_INET)
               && (ifa->ifa_addr->sa_family != AF_INET6) )
            continue; /* AF_PACKET is beyond our scope. */

btw, 1.0pre1 also suffers from the segfault, this patch fixes it (to get it
to build you have to remove import of net/bpf.h in iftop.c, and only make
iftop)

Reply via email to