]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-cdp.c
Don't require IPv6 library support in order to support IPv6 addresses.
[tcpdump] / print-cdp.c
index 3065193e2f65f0c04c4ba8779d3aeb9bd3a06279..96ef143b158ec4f2c347a1702290b29e78f042a5 100644 (file)
@@ -277,11 +277,9 @@ cdp_print_addr(netdissect_options *ndo,
 {
        int pt, pl, al, num;
        const u_char *endp = p + l;
-#ifdef INET6
        static const u_char prot_ipv6[] = {
                0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00, 0x86, 0xdd
        };
-#endif
 
        ND_TCHECK2(*p, 4);
        if (p + 4 > endp)
@@ -316,7 +314,6 @@ cdp_print_addr(netdissect_options *ndo,
                        ND_PRINT((ndo, "IPv4 (%u) %s", num, ipaddr_string(ndo, p)));
                        p += 4;
                }
-#ifdef INET6
                else if (pt == PT_IEEE_802_2 && pl == 8 &&
                    memcmp(p, prot_ipv6, 8) == 0 && al == 16) {
                        /*
@@ -333,7 +330,6 @@ cdp_print_addr(netdissect_options *ndo,
                        ND_PRINT((ndo, "IPv6 (%u) %s", num, ip6addr_string(ndo, p)));
                        p += al;
                }
-#endif
                else {
                        /*
                         * Generic case: just print raw data