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)
Tue, Sep 24, 12:30 AM
Unknown Object (File)
Fri, Sep 20, 4:21 PM
Unknown Object (File)
Fri, Sep 20, 10:17 AM
Unknown Object (File)
Thu, Sep 19, 5:31 PM
Unknown Object (File)
Thu, Sep 19, 4:35 PM
Unknown Object (File)
Sun, Sep 8, 8:42 PM
Unknown Object (File)
Aug 18 2024, 4:31 PM
Unknown Object (File)
Aug 16 2024, 7:53 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.