Skip to content

Commit 5b278cf

Browse files
committed
pflog: handle all types of pflog files, as best as can be done.
We can distinguish between FreeBSD, OpenBSD, and everything else (NetBSD, DragonFly BSD, and Darwin) based on the length field in the header. For NetBSD, DragonFly BSD, and Darwin, the differences are the meaning of certain reason and action codes; we just mark those with the OSes and meanings, so the user will have to figure out whether reason code 15 is "state-locked' (NetBSD)" or "dummynet" (Darwin)". The other ones shouldn't occur on OSes other than Darwin, but we mark it just in case they do. Fix the handling of "UID not present"; that's 0xFFFFFFFFU in FreeBSD, OpenBSD, and DragonFly BSD, but it's 0x7FFFFFFFU in NetBSD and Darwin, so for "neither NetBSD nor OpenBSD" we check for both of those values. Do the checks for minimum and maximum header lengths before we round the header length up.
1 parent eefe51e commit 5b278cf

File tree

2 files changed

+214
-74
lines changed

2 files changed

+214
-74
lines changed

CHANGES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ Friday, August 30, 2024 / The Tcpdump Group
148148
OSPF: Update LS-Ack printing not to run off the end of the packet.
149149
OSPF6: Fix an undefined behavior.
150150
pflog: use nd_ types in struct pfloghdr.
151+
pflog: handle all types of pflog files (as best as can be done)
151152
PPP: Check if there is some data to hexdump.
152153
PPP: Remove an extra colon before LCP Callback Operation.
153154
Use the buffer stack for de-escaping PPP; fixes CVE-2024-2397;

0 commit comments

Comments
 (0)