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, Mar 23, 3:21 PM
Unknown Object (File)
Sun, Mar 23, 3:44 AM
Unknown Object (File)
Fri, Mar 21, 5:11 PM
Unknown Object (File)
Thu, Mar 20, 4:36 PM
Unknown Object (File)
Tue, Mar 18, 12:38 AM
Unknown Object (File)
Mon, Mar 17, 5:44 PM
Unknown Object (File)
Sun, Mar 16, 6:34 PM
Unknown Object (File)
Tue, Mar 11, 12:44 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