summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
Diffstat (limited to 'sbin')
-rwxr-xr-xsbin/dhclient-script6
1 files changed, 2 insertions, 4 deletions
diff --git a/sbin/dhclient-script b/sbin/dhclient-script
index 272bb77..814d1b9 100755
--- a/sbin/dhclient-script
+++ b/sbin/dhclient-script
@@ -66,8 +66,7 @@ delete_old_states() {
$LOGGER "Comparing IPs: Old: ${OLD_IP} New: ${new_ip_address}"
if [ -n "${OLD_IP}" ] && [ "${OLD_IP}" != "${new_ip_address}" ]; then
$LOGGER "Removing states from old IP '${OLD_IP}' (new IP '${new_ip_address}')"
- /sbin/pfctl -k 0.0.0.0/0 -k ${OLD_IP}/32
- /sbin/pfctl -k ${OLD_IP}/32
+ /sbin/pfctl -i $interface -Fs
pfctl -K ${OLD_IP}/32
fi
fi
@@ -82,8 +81,7 @@ delete_old_states() {
$LOGGER "Comparing Routers: Old: ${OLD_ROUTER} New: ${new_routers}"
if [ "${OLD_ROUTER}" != "${new_routers}" ]; then
$LOGGER "Removing states through old gateway '${OLD_ROUTER}' (new gateway '${new_routers}')"
- /sbin/pfctl -i $interface -k 0.0.0.0/0 -k ${OLD_ROUTER}/32
- /sbin/pfctl -i $interface -k ${OLD_ROUTER}/32 -k 0.0.0.0/0
+ /sbin/pfctl -i $interface -Fs -G ${OLD_ROUTER}
fi
fi
}
OpenPOWER on IntegriCloud