mirror of
https://git.FreeBSD.org/src.git
synced 2024-10-19 02:29:40 +00:00
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 e59eff9ad3
)
This commit is contained in:
parent
6f89edcd83
commit
b8110a4d73
@ -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");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user