X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/e7cfa5e63a27e6fbb75e0bbd151af2c7d0d222e9..d338a0a1a95d021e9654b4c80ee64fb4d3e40827:/print-ether.c diff --git a/print-ether.c b/print-ether.c index 02ab0665..4e0d6f0f 100644 --- a/print-ether.c +++ b/print-ether.c @@ -254,8 +254,15 @@ recurse: } length_type = GET_BE_U_2(p + 2); - if (ndo->ndo_eflag && length_type > MAX_ETHERNET_LENGTH_VAL) - ND_PRINT("ethertype %s, ", tok2str(ethertype_values,"0x%04x", length_type)); + if (ndo->ndo_eflag && length_type > MAX_ETHERNET_LENGTH_VAL) { + if (!ndo->ndo_qflag) + ND_PRINT("ethertype %s (0x%04x), ", + tok2str(ethertype_values,"Unknown", length_type), + length_type); + else + ND_PRINT("%s, ", + tok2str(ethertype_values,"Unknown Ethertype (0x%04x)", length_type)); + } p += 4; length -= 4; caplen -= 4;