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, Dec 3, 11:08 PM
Unknown Object (File)
Nov 20 2024, 2:10 AM
Unknown Object (File)
Nov 16 2024, 7:47 AM
Unknown Object (File)
Nov 15 2024, 5:48 AM
Unknown Object (File)
Nov 15 2024, 3:16 AM
Unknown Object (File)
Nov 13 2024, 4:22 PM
Unknown Object (File)
Nov 11 2024, 7:32 AM
Unknown Object (File)
Oct 23 2024, 8: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.