git: 7b4013ac3220 - stable/12 - pfctl: fix killing states by ID
Kristof Provost
kp at FreeBSD.org
Tue Aug 31 11:51:46 UTC 2021
The branch stable/12 has been updated by kp:
URL: https://cgit.FreeBSD.org/src/commit/?id=7b4013ac3220327944cd96027dea620bf93ce228
commit 7b4013ac3220327944cd96027dea620bf93ce228
Author: Kristof Provost <kp at FreeBSD.org>
AuthorDate: 2021-08-24 10:24:28 +0000
Commit: Kristof Provost <kp at FreeBSD.org>
CommitDate: 2021-08-31 07:47:43 +0000
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")
(cherry picked from commit e59eff9ad3285838730acf48f6d066cec0e53114)
---
sbin/pfctl/pfctl.c | 2 --
1 file changed, 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");
More information about the dev-commits-src-all
mailing list