1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-19 02:29:40 +00:00

libpfctl: fix pfctl_kill_states()

735748f30a changed the output of the states so that the creator id
endianness would be consistent. This means that we need to convert the
host endianness creatorid back to big-endian before we give it to the
kernel.

MFC after:	3 weeks
Sponsored by:	Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 6f47a72d8e)
This commit is contained in:
Kristof Provost 2022-01-31 18:31:53 +01:00
parent 63220460d0
commit c428292cb3

View File

@ -758,7 +758,7 @@ pfctl_nv_add_state_cmp(nvlist_t *nvl, const char *name,
nv = nvlist_create(0);
nvlist_add_number(nv, "id", cmp->id);
nvlist_add_number(nv, "creatorid", cmp->creatorid);
nvlist_add_number(nv, "creatorid", htonl(cmp->creatorid));
nvlist_add_number(nv, "direction", cmp->direction);
nvlist_add_nvlist(nvl, name, nv);