From a8522b7243e6b0fe76c91ccf52a9128d5fa9d0f6 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Fri, 26 Nov 2021 10:27:11 +0100 Subject: [PATCH] interfaces: use same approach as ppp-linkup script #5367 --- src/etc/rc.newwanip | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/etc/rc.newwanip b/src/etc/rc.newwanip index c7c3ad656..19fbb6dae 100755 --- a/src/etc/rc.newwanip +++ b/src/etc/rc.newwanip @@ -164,8 +164,8 @@ if (!is_ipaddr($cacheip) || $ip != $cacheip || !is_ipaddr($configip)) { mwexec('/sbin/pfctl -Fs'); } else if (is_ipaddr($cacheip) && $ip != $cacheip) { log_error("IP address change detected, killing states of old ip $cacheip"); - mwexecf('/sbin/pfctl -k 0.0.0.0/0 -k %s', $cacheip); - mwexecf('/sbin/pfctl -k %s', $cacheip); + mwexecf('/sbin/pfctl -i %s -k 0.0.0.0/0 -k %s/32', [$interface_real, $cacheip]); + mwexecf('/sbin/pfctl -i %s -k %s/32 -k 0.0.0.0/0', [$interface_real, $cacheip]); } if (is_ipaddr($ip)) {