Skip to content

Commit

Permalink
libpfctl: fix pfctl_kill_states()
Browse files Browse the repository at this point in the history
735748f 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 6f47a72)
  • Loading branch information
kprovost committed Feb 18, 2022
1 parent 6322046 commit c428292
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/libpfctl/libpfctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c428292

Please sign in to comment.