Skip to content

Commit 4889545

Browse files
committed
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 <[email protected]>, cde97ca321 Sponsored by: Rubicon Communications, LLC ("Netgate")
1 parent d3020ca commit 4889545

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sbin/pfctl/pfctl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ pfctl_kill_src_nodes(int dev, int opts)
701701

702702
dests++;
703703

704-
copy_satopfaddr(&psnk.psnk_src.addr.v.a.addr,
704+
copy_satopfaddr(&psnk.psnk_dst.addr.v.a.addr,
705705
resp[1]->ai_addr);
706706
if (ioctl(dev, DIOCKILLSRCNODES, &psnk))
707707
err(1, "DIOCKILLSRCNODES");
@@ -790,7 +790,7 @@ pfctl_net_kill_states(int dev, const char *iface, int opts)
790790

791791
dests++;
792792

793-
copy_satopfaddr(&kill.src.addr.v.a.addr,
793+
copy_satopfaddr(&kill.dst.addr.v.a.addr,
794794
resp[1]->ai_addr);
795795

796796
if ((ret = pfctl_kill_states_h(pfh, &kill, &newkilled)) != 0)

0 commit comments

Comments
 (0)