The fix to pfctl_kill_src_nodes() comes from Olivier Croquin.
authorsashan <sashan@openbsd.org>
Fri, 2 Feb 2024 08:23:29 +0000 (08:23 +0000)
committersashan <sashan@openbsd.org>
Fri, 2 Feb 2024 08:23:29 +0000 (08:23 +0000)
bluhm@ pointed out pfctl_net_kill_states() suffers from the
same copy'n'paste typo. Commit combines both fixes.

OK @bluhm, OK @kn

sbin/pfctl/pfctl.c

index ece39d2..27cc175 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: pfctl.c,v 1.393 2024/01/15 07:23:32 sashan Exp $ */
+/*     $OpenBSD: pfctl.c,v 1.394 2024/02/02 08:23:29 sashan Exp $ */
 
 /*
  * Copyright (c) 2001 Daniel Hartmeier
@@ -514,7 +514,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) == -1)
@@ -595,7 +595,7 @@ pfctl_net_kill_states(int dev, const char *iface, int opts, int rdomain)
 
                                dests++;
 
-                               copy_satopfaddr(&psk.psk_src.addr.v.a.addr,
+                               copy_satopfaddr(&psk.psk_dst.addr.v.a.addr,
                                    resp[1]->ai_addr);
 
                                if (ioctl(dev, DIOCKILLSTATES, &psk) == -1)