Page MenuHomeFreeBSD

libpfctl: fix creatorid endianness
ClosedPublic

Authored by kp on Jan 21 2022, 5:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Oct 15, 8:05 AM
Unknown Object (File)
Oct 3 2024, 11:59 AM
Unknown Object (File)
Sep 25 2024, 8:18 AM
Unknown Object (File)
Sep 9 2024, 7:19 AM
Unknown Object (File)
Sep 9 2024, 7:19 AM
Unknown Object (File)
Sep 4 2024, 4:44 PM
Unknown Object (File)
Sep 2 2024, 12:41 PM
Unknown Object (File)
Aug 19 2024, 8:08 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