Page MenuHomeFreeBSD

if_pflog: fix packet length
ClosedPublic

Authored by kp on Dec 2 2021, 6:47 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 16, 7:47 AM
Unknown Object (File)
Fri, Nov 15, 5:48 AM
Unknown Object (File)
Fri, Nov 15, 3:16 AM
Unknown Object (File)
Wed, Nov 13, 4:22 PM
Unknown Object (File)
Mon, Nov 11, 7:32 AM
Unknown Object (File)
Wed, Oct 23, 8:53 AM
Unknown Object (File)
Oct 2 2024, 7:26 PM
Unknown Object (File)
Sep 24 2024, 12:30 AM

Details

Summary

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>
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kp requested review of this revision.Dec 2 2021, 6:47 PM
This revision was not accepted when it landed; it landed in state Needs Review.Dec 4 2021, 8:46 AM
This revision was automatically updated to reflect the committed changes.