Date: Tue, 24 Aug 2021 12:57:37 GMT From: Kristof Provost <kp@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: e59eff9ad328 - main - pfctl: fix killing states by ID Message-ID: <202108241257.17OCvbon079142@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=e59eff9ad3285838730acf48f6d066cec0e53114 commit e59eff9ad3285838730acf48f6d066cec0e53114 Author: Kristof Provost <kp@FreeBSD.org> AuthorDate: 2021-08-24 10:24:28 +0000 Commit: Kristof Provost <kp@FreeBSD.org> CommitDate: 2021-08-24 10:54:13 +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") --- 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");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202108241257.17OCvbon079142>