From 096f2962a95269a4ac69a38fd615d6e4da0256eb Mon Sep 17 00:00:00 2001 From: Ermal Date: Tue, 12 Feb 2013 12:01:09 +0000 Subject: Ticket #1629 Another round of fixes related to state clearing --- sbin/dhclient-script | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'sbin') 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 } -- cgit v1.1