diff options
author | Kristof Provost <kp@FreeBSD.org> | 2021-08-24 10:24:28 +0000 |
---|---|---|
committer | Kristof Provost <kp@FreeBSD.org> | 2021-08-24 10:54:13 +0000 |
commit | e59eff9ad3285838730acf48f6d066cec0e53114 (patch) | |
tree | 1aff089d124948686887d1b4d6a9da9ffedf73bf | |
parent | 36fc38301824e2d6ca774200d8be972a6196f353 (diff) |
pfctl: fix killing states by ID
Since the conversion to the new DIOCKILLSTATESNV the kernel no longer
exists the id and creatorid to be big-endian.
As a result killing states by id (i.e. `pfctl -k id -k 12345`) no longer
worked.
Reported by: Özkan KIRIK
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
-rw-r--r-- | sbin/pfctl/pfctl.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index 6c689edf7c43..ad2cfd4e63bc 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -908,7 +908,6 @@ pfctl_id_kill_states(int dev, const char *iface, int opts) if ((sscanf(state_kill[1], "%jx/%x", &kill.cmp.id, &kill.cmp.creatorid)) == 2) - HTONL(kill.cmp.creatorid); else if ((sscanf(state_kill[1], "%jx", &kill.cmp.id)) == 1) { kill.cmp.creatorid = 0; } else { @@ -920,7 +919,6 @@ pfctl_id_kill_states(int dev, const char *iface, int opts) usage(); } - kill.cmp.id = htobe64(kill.cmp.id); if (pfctl_kill_states(dev, &kill, &killed)) err(1, "DIOCKILLSTATES"); |