diff options
Diffstat (limited to 'print-cdp.c')
-rw-r--r-- | print-cdp.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/print-cdp.c b/print-cdp.c index 9f5c24bc..f3004842 100644 --- a/print-cdp.c +++ b/print-cdp.c @@ -389,8 +389,7 @@ cdp_print_addr(netdissect_options *ndo, ND_PRINT("IPv4 (%u) %s", num, GET_IPADDR_STRING(p)); p += al; l -= al; - } - else if (pt == PT_IEEE_802_2 && pl == 8 && + } else if (pt == PT_IEEE_802_2 && pl == 8 && memcmp(p, prot_ipv6, 8) == 0 && al == 16) { /* * IPv6: protocol type = IEEE 802.2 header, @@ -408,8 +407,7 @@ cdp_print_addr(netdissect_options *ndo, ND_PRINT("IPv6 (%u) %s", num, GET_IP6ADDR_STRING(p)); p += al; l -= al; - } - else { + } else { /* * Generic case: just print raw data */ |