Page MenuHomeFreeBSD

libpfctl: fix creatorid endianness
ClosedPublic

Authored by kp on Jan 21 2022, 5:36 PM.
Tags
None
Referenced Files
F167954574: D33989.diff
Tue, Aug 25, 2:56 PM
F167950682: D33989.id101979.diff
Tue, Aug 25, 2:27 PM
F167847913: D33989.id101751.diff
Mon, Aug 24, 11:43 PM
Unknown Object (File)
Mon, Aug 24, 8:53 PM
Unknown Object (File)
Sun, Aug 23, 10:29 PM
Unknown Object (File)
Sun, Aug 23, 8:09 PM
Unknown Object (File)
Sat, Aug 22, 9:18 PM
Unknown Object (File)
Sat, Aug 22, 5:58 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