aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristof Provost <kp@FreeBSD.org>2022-01-31 17:31:53 +0000
committerKristof Provost <kp@FreeBSD.org>2022-01-31 18:13:26 +0000
commit6f47a72d8ebf444641bda192b33eb217c9013811 (patch)
tree3c9194a7433c6eae9e024aca84f094ec404a8ee5
parentd7e8005bfa6517b1a82626d48daaa25678a7e4cd (diff)
downloadsrc-6f47a72d8ebf444641bda192b33eb217c9013811.tar.gz
src-6f47a72d8ebf444641bda192b33eb217c9013811.zip
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")
-rw-r--r--lib/libpfctl/libpfctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c
index 58bae146cf6a..66f7f61cc1fa 100644
--- a/lib/libpfctl/libpfctl.c
+++ b/lib/libpfctl/libpfctl.c
@@ -764,7 +764,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);