--- Begin Message ---
On Fri, 18 Sep 2020 10:25:13 +0200
Francois-Xavier Le Bail <devel.fx.leb...@orange.fr> wrote:
[...]
> switch (setjmp(ndo->early_end)) {
> case 0:
> /* Print the packet. */
> (ndo->ndo_if_printer)(ndo, h, sp);
> break;
> case ND_TRUNCATED:
> /* A printer quit because the packet was truncated;
> report it */ nd_print_trunc(ndo);
> break;
> case ND_INVALID:
> ND_PRINT(" (invalid)"); /* or calling a function that
> do the print */ }
[...]
The switch block should also have a default case, which ideally should
never happen, but if it somehow happens, it should either fail the
current packet safe or just call ndo_error().
--
Denis Ovsienko
--- End Message ---
_______________________________________________
tcpdump-workers mailing list
tcpdump-workers@lists.tcpdump.org
https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers