X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/176e182416d822df0f9d4695410479e8b17a07b3..cda9bf8c5f842fc7110fbbf2234bcc898f78c0bd:/print.c diff --git a/print.c b/print.c index 1669cb3b..44040ecd 100644 --- a/print.c +++ b/print.c @@ -233,6 +233,9 @@ static const struct printer printers[] = { #endif #ifdef DLT_DSA_TAG_BRCM_PREPEND { brcm_tag_prepend_if_print, DLT_DSA_TAG_BRCM_PREPEND }, +#endif +#ifdef DLT_VSOCK + { vsock_if_print, DLT_VSOCK }, #endif { NULL, 0 }, }; @@ -405,6 +408,13 @@ pretty_print_packet(netdissect_options *ndo, const struct pcap_pkthdr *h, ND_PRINT(" [|%s]", ndo->ndo_protocol); } + /* + * Free all pushed buffers; if we got here by a printer quitting, + * we need to release anything that didn't get released because + * we longjmped out of the code before it popped a buffer. + */ + nd_pop_all_buffers(ndo); + /* * Restore the original snapend, as a printer might have * changed it.