mirror of
https://github.com/opnsense/src.git
synced 2026-04-02 07:55:21 -04: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")
This commit is contained in:
parent
36fc383018
commit
e59eff9ad3
1 changed files with 0 additions and 2 deletions
|
|
@ -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 a new issue