HomeFreeBSD

if_pflog: fix packet length

Description

if_pflog: fix packet length

There were two issues with the new pflog packet length.
The first is that the length is expected to be a multiple of
sizeof(long), but we'd assumed it had to be a multiple of
sizeof(uint32_t).

The second is that there's some broken software out there (such as
Wireshark) that makes incorrect assumptions about the amount of padding.
That is, Wireshark assumes there's always three bytes of padding, rather
than however much is needed to get to a multiple of sizeof(long).

Fix this by adding extra padding, and a fake field to maintain
Wireshark's assumption.

Reported by: Ozkan KIRIK <ozkan.kirik@gmail.com>
Tested by: Ozkan KIRIK <ozkan.kirik@gmail.com>
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D33236

Details

Provenance
kpAuthored on Dec 2 2021, 7:22 AM
Differential Revision
D33236: if_pflog: fix packet length
Parents
rG98470f0e0bc7: Fix "set but not used" in mrsas. This includes removing unnecessary cdevsw
Branches
Unknown
Tags
Unknown