aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristof Provost <kp@FreeBSD.org>2025-08-20 14:16:03 +0000
committerKristof Provost <kp@FreeBSD.org>2025-09-10 19:51:40 +0000
commit4889545b8795b69bd9aca1c8320a8847f3cd6aeb (patch)
treec77e3e8baa179c06d1e92977dbebe265eb1acf6d
parentd3020caed603e3b1bfb82099557134ccd4c71449 (diff)
pfctl: fix killing state by source and destination address
The fix to pfctl_kill_src_nodes() comes from Olivier Croquin. bluhm@ pointed out pfctl_net_kill_states() suffers from the same copy'n'paste typo. Commit combines both fixes. OK @bluhm, OK @kn Obtained from: OpenBSD, sashan <sashan@openbsd.org>, cde97ca321 Sponsored by: Rubicon Communications, LLC ("Netgate")
-rw-r--r--sbin/pfctl/pfctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c
index 10a833ea4850..2c12387ee388 100644
--- a/sbin/pfctl/pfctl.c
+++ b/sbin/pfctl/pfctl.c
@@ -701,7 +701,7 @@ pfctl_kill_src_nodes(int dev, int opts)
dests++;
- copy_satopfaddr(&psnk.psnk_src.addr.v.a.addr,
+ copy_satopfaddr(&psnk.psnk_dst.addr.v.a.addr,
resp[1]->ai_addr);
if (ioctl(dev, DIOCKILLSRCNODES, &psnk))
err(1, "DIOCKILLSRCNODES");
@@ -790,7 +790,7 @@ pfctl_net_kill_states(int dev, const char *iface, int opts)
dests++;
- copy_satopfaddr(&kill.src.addr.v.a.addr,
+ copy_satopfaddr(&kill.dst.addr.v.a.addr,
resp[1]->ai_addr);
if ((ret = pfctl_kill_states_h(pfh, &kill, &newkilled)) != 0)