aboutsummaryrefslogtreecommitdiffstats
path: root/package/ppp/files/etc/ppp/ipv6-down
diff options
context:
space:
mode:
Diffstat (limited to 'package/ppp/files/etc/ppp/ipv6-down')
-rw-r--r--package/ppp/files/etc/ppp/ipv6-down16
1 files changed, 15 insertions, 1 deletions
diff --git a/package/ppp/files/etc/ppp/ipv6-down b/package/ppp/files/etc/ppp/ipv6-down
index 76678de72c..a4e0491a80 100644
--- a/package/ppp/files/etc/ppp/ipv6-down
+++ b/package/ppp/files/etc/ppp/ipv6-down
@@ -1,2 +1,16 @@
#!/bin/sh
-route -A inet6 del $4 dev $1
+
+gw=$4
+dev=$1
+cfg=$6
+
+. /etc/functions.sh # common functions
+include /lib/network # include /lib/network/*.sh
+scan_interfaces # read and parse the network config
+
+config_get_bool defaultroute "$cfg" defaultroute 1
+
+if [ ${defaultroute} -eq 1 ]
+then
+ route -A inet6 del default gw ${gw} dev ${dev}
+fi