summaryrefslogtreecommitdiffstats
path: root/usr/local/sbin/ppp-linkup
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2012-09-26 08:48:12 -0400
committerjim-p <jimp@pfsense.org>2012-09-26 08:48:12 -0400
commit766cd4502596209a148eb114fc422e6b2245f3d9 (patch)
treeb6d7fa04d48ecfe2182036a25c3f1432a567571c /usr/local/sbin/ppp-linkup
parent80c043fa48788950eef05eafe9ec25c19457db57 (diff)
downloadpfsense-766cd4502596209a148eb114fc422e6b2245f3d9.zip
pfsense-766cd4502596209a148eb114fc422e6b2245f3d9.tar.gz
Try a little harder to clear the states for the old PPP gateway
Diffstat (limited to 'usr/local/sbin/ppp-linkup')
-rwxr-xr-xusr/local/sbin/ppp-linkup7
1 files changed, 7 insertions, 0 deletions
diff --git a/usr/local/sbin/ppp-linkup b/usr/local/sbin/ppp-linkup
index dba4412..3a62fbb 100755
--- a/usr/local/sbin/ppp-linkup
+++ b/usr/local/sbin/ppp-linkup
@@ -1,6 +1,13 @@
#!/bin/sh
if [ "$2" == "inet" ]; then
+
+ OLD_ROUTER=`/bin/cat /tmp/${1}_router`
+ if [ "${OLD_ROUTER}" != "" ]; then
+ echo "Removing states to old router ${OLD_ROUTER}" | logger -t ppp-linkup
+ /sbin/pfctl -b 0.0.0.0/32 -b ${OLD_ROUTER}/32
+ fi
+
# let the configuration system know that the ipv4 has changed.
/bin/echo $4 > /tmp/$1_router
/bin/echo $3 > /tmp/$1_ip
OpenPOWER on IntegriCloud