Page MenuHomeFreeBSD

libpfctl: fix creatorid endianness
ClosedPublic

Authored by kp on Jan 21 2022, 5:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Feb 8, 8:20 AM
Unknown Object (File)
Sun, Feb 8, 3:37 AM
Unknown Object (File)
Sun, Feb 8, 2:39 AM
Unknown Object (File)
Sat, Jan 31, 4:15 AM
Unknown Object (File)
Fri, Jan 30, 6:34 PM
Unknown Object (File)
Wed, Jan 28, 5:38 PM
Unknown Object (File)
Fri, Jan 23, 7:37 AM
Unknown Object (File)
Dec 1 2025, 5:47 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