Page MenuHomeFreeBSD

libpfctl: fix creatorid endianness
ClosedPublic

Authored by kp on Jan 21 2022, 5:36 PM.
Tags
None
Referenced Files
F136032182: D33989.diff
Sat, Nov 15, 6:30 AM
Unknown Object (File)
Thu, Nov 6, 2:59 PM
Unknown Object (File)
Thu, Nov 6, 6:15 AM
Unknown Object (File)
Thu, Nov 6, 3:25 AM
Unknown Object (File)
Sat, Nov 1, 10:47 PM
Unknown Object (File)
Wed, Oct 29, 8:39 AM
Unknown Object (File)
Wed, Oct 29, 7:00 AM
Unknown Object (File)
Wed, Oct 29, 6:59 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