X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/ef5323efe6c03aaa50eac0949bf95999b91fe05b..refs/pull/1034/head:/print-ether.c diff --git a/print-ether.c b/print-ether.c index d20addbf..b1865d17 100644 --- a/print-ether.c +++ b/print-ether.c @@ -86,7 +86,7 @@ const struct tok ethertype_values[] = { { ETHERTYPE_PPPOED, "PPPoE D" }, { ETHERTYPE_PPPOES, "PPPoE S" }, { ETHERTYPE_EAPOL, "EAPOL" }, - { ETHERTYPE_RRCP, "RRCP" }, + { ETHERTYPE_REALTEK, "Realtek protocols" }, { ETHERTYPE_MS_NLB_HB, "MS NLB heartbeat" }, { ETHERTYPE_JUMBO, "Jumbo" }, { ETHERTYPE_NSH, "NSH" }, @@ -306,7 +306,10 @@ recurse: * Cut off the snapshot length to the end of the * payload. */ - nd_push_snapend(ndo, p + length); + if (!nd_push_snaplen(ndo, p, length)) { + (*ndo->ndo_error)(ndo, S_ERR_ND_MEM_ALLOC, + "%s: can't push snaplen on buffer stack", __func__); + } if (ndo->ndo_eflag) { ND_PRINT("802.3"); @@ -584,8 +587,8 @@ ethertype_print(netdissect_options *ndo, eapol_print(ndo, p); return (1); - case ETHERTYPE_RRCP: - rrcp_print(ndo, p, length, src, dst); + case ETHERTYPE_REALTEK: + rtl_print(ndo, p, length, src, dst); return (1); case ETHERTYPE_PPP: