]> The Tcpdump Group git mirrors - tcpdump/commit
pflog: Modernize packet parsing
authorFrancois-Xavier Le Bail <[email protected]>
Fri, 16 Feb 2024 15:49:02 +0000 (16:49 +0100)
committerfxlb <[email protected]>
Sat, 17 Feb 2024 06:17:17 +0000 (06:17 +0000)
commit83afc6862927510f50d50e4a157c81a56d38a959
tree973687d9531eea3aeb7a71626ea8c9c96460f0c2
parentac2471df3971995df94831796621263ce0805049
pflog: Modernize packet parsing

Enable ND_LONGJMP_FROM_TCHECK and remove a 'trunc' label.
Add MAX_PFLOG_HDRLEN and use it for a test.
Use ND_ICHECK_U() in length tests and add an 'invalid' label.

Don't check the truncation with ND_TCHECK_SIZE(hdr), because the
sizeof(hdr) depend on the OS. Use ND_TCHECK_LEN(hdr, hdrlen).
Increment ndo_ll_hdr_len only in non-truncation case.
print-pflog.c