]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Don't assume we have IPv6 support.
authorGuy Harris <[email protected]>
Sun, 14 Aug 2011 22:32:06 +0000 (15:32 -0700)
committerGuy Harris <[email protected]>
Sun, 14 Aug 2011 22:32:27 +0000 (15:32 -0700)
print-babel.c

index a8108fc5cd4cbe12ea3ff3305b3f8c036b34ff38..a61651db265c74c9acc107c8318b7ce23650eb8c 100644 (file)
@@ -118,7 +118,11 @@ format_prefix(const u_char *prefix, unsigned char plen)
     if(plen >= 96 && memcmp(prefix, v4prefix, 12) == 0)
         snprintf(buf, 50, "%s/%u", ipaddr_string(prefix + 12), plen - 96);
     else
+#ifdef INET6
         snprintf(buf, 50, "%s/%u", ip6addr_string(prefix), plen);
+#else
+        snprintf(buf, 50, "(IPv6 address)");
+#endif
     buf[49] = '\0';
     return buf;
 }
@@ -129,7 +133,11 @@ format_address(const u_char *prefix)
     if(memcmp(prefix, v4prefix, 12) == 0)
         return ipaddr_string(prefix + 12);
     else
+#ifdef INET6
         return ip6addr_string(prefix);
+#else
+        return "(IPv6 address)";
+#endif
 }
 
 static int