[Bug 261566] Padding of DLT_PFLOG packets should be done differently

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 01 Feb 2022 00:03:58 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261566

--- Comment #3 from Guy Harris <gharris@sonic.net> ---
> I distinctly recall looking at the Wireshark code before implementing the BPF_WORDALIGN(), however it clearly does `padded_length = WS_ROUNDUP_4(length);`, so I don't know what happened there.

It got fixed from "add 3 to the length under the assumption that there's 1 byte
of padding" to "round it up to a multiple of 4".

(Tcpdump now does the same thing, and libpcap now gets the pflog header length
from the length field, rounding it up to a multiple of 4, rather than having a
hardwired length based on whatever platform it was compiled on.)

> How does this look to you:

That should work.

-- 
You are receiving this mail because:
You are the assignee for the bug.