Page MenuHomeFreeBSD

libpfctl: fix creatorid endianness
ClosedPublic

Authored by kp on Jan 21 2022, 5:36 PM.
Tags
None
Referenced Files
F150380449: D33989.id101752.diff
Tue, Mar 31, 5:35 PM
Unknown Object (File)
Mon, Mar 30, 8:08 AM
Unknown Object (File)
Thu, Mar 26, 10:08 PM
Unknown Object (File)
Mon, Mar 23, 12:26 PM
Unknown Object (File)
Fri, Mar 6, 5:21 AM
Unknown Object (File)
Feb 25 2026, 4:42 AM
Unknown Object (File)
Feb 8 2026, 8:20 AM
Unknown Object (File)
Feb 8 2026, 3:37 AM

Details

Summary

We provide the hostid (which is the state creatorid) to the kernel as a
big endian number (see pfctl/pfctl.c pfctl_set_hostid()), so convert it
back to system endianness when we get it from the kernel.

This avoids a confusing mismatch between the value the user configures
and the value displayed in the state.

MFC after: 3 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 44032
Build 40920: arc lint + arc unit