Page MenuHomeFreeBSD

libpfctl: fix creatorid endianness
ClosedPublic

Authored by kp on Jan 21 2022, 5:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Oct 11, 5:07 AM
Unknown Object (File)
Thu, Oct 9, 5:31 AM
Unknown Object (File)
Wed, Oct 8, 5:43 PM
Unknown Object (File)
Sat, Sep 27, 12:18 PM
Unknown Object (File)
Fri, Sep 19, 9:03 AM
Unknown Object (File)
Mon, Sep 15, 2:13 AM
Unknown Object (File)
Sat, Sep 13, 7:26 PM
Unknown Object (File)
Sep 12 2025, 8:14 PM

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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable