summaryrefslogtreecommitdiffstats
path: root/usr/local/sbin/ppp-linkdown
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2013-03-19 15:31:46 -0300
committerRenato Botelho <garga@FreeBSD.org>2013-03-19 15:36:53 -0300
commit46e27ea790e6f68fa648404a7159de1fa6746fe8 (patch)
treea14c2e8e2497f4754750b3ed825839e032aaafc1 /usr/local/sbin/ppp-linkdown
parent9cc119c259bd1d3130d1d16ae0490d5363170cc2 (diff)
downloadpfsense-46e27ea790e6f68fa648404a7159de1fa6746fe8.zip
pfsense-46e27ea790e6f68fa648404a7159de1fa6746fe8.tar.gz
Respect 'States' option from Advanced/Misc
- Respect this option and do not clean states when it's configured - Create /etc/rc.kill_states to be easier to check $config It helps ticket #2887
Diffstat (limited to 'usr/local/sbin/ppp-linkdown')
-rwxr-xr-xusr/local/sbin/ppp-linkdown12
1 files changed, 2 insertions, 10 deletions
diff --git a/usr/local/sbin/ppp-linkdown b/usr/local/sbin/ppp-linkdown
index c0d2f3f..54807ac 100755
--- a/usr/local/sbin/ppp-linkdown
+++ b/usr/local/sbin/ppp-linkdown
@@ -7,17 +7,9 @@ if [ -f /tmp/${IF}up ] && [ -f /conf/${IF}.log ]; then
seconds=$((`date -j +%s` - `/usr/bin/stat -f %m /tmp/${IF}up`))
/usr/local/sbin/ppp-log-uptime.sh $seconds ${IF} &
fi
-if [ -n "${LOCAL_IP}" ]; then
- if ! echo "${LOCAL_IP}" | grep -q "/"; then
- LOCAL_IP="${LOCAL_IP}/32"
- fi
- echo "Removing states from ${LOCAL_IP}" | /usr/bin/logger -t ppp-linkdown
- /sbin/pfctl -k 0.0.0.0/0 -k ${LOCAL_IP}
- /sbin/pfctl -k ${LOCAL_IP}
- /sbin/pfctl -K ${LOCAL_IP}
-fi
-/sbin/pfctl -i ${IF} -Fs
+/etc/rc.kill_states ${IF} ${LOCAL_IP}
+
if [ -f "/tmp/${IF}_defaultgw" ]; then
/sbin/route delete default `/usr/bin/head -n 1 /tmp/${IF}_defaultgw`;
fi
OpenPOWER on IntegriCloud