Page MenuHomeFreeBSD

libpfctl: fix creatorid endianness
ClosedPublic

Authored by kp on Jan 21 2022, 5:36 PM.
Tags
None
Referenced Files
F154316692: D33989.diff
Mon, Apr 27, 7:22 PM
F154311159: D33989.id101979.diff
Mon, Apr 27, 6:33 PM
Unknown Object (File)
Sun, Apr 26, 9:40 PM
Unknown Object (File)
Sun, Apr 26, 7:50 AM
Unknown Object (File)
Sat, Apr 25, 6:21 AM
Unknown Object (File)
Tue, Apr 21, 11:41 AM
Unknown Object (File)
Tue, Apr 21, 6:33 AM
Unknown Object (File)
Tue, Apr 21, 3:54 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 44033
Build 40921: arc lint + arc unit