aboutsummaryrefslogtreecommitdiffstats
path: root/package/ppp/files/etc
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-11-07 13:24:10 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-11-07 13:24:10 +0000
commitf77a9849c03c30784e59f4c2a03a51263954a89a (patch)
treeadd1be472eaad2e32cd7bf051cd0501c2051a7c6 /package/ppp/files/etc
parent5bc6d1c39e6541fefaf357946500f1c9bca03fa5 (diff)
downloadupstream-f77a9849c03c30784e59f4c2a03a51263954a89a.tar.gz
upstream-f77a9849c03c30784e59f4c2a03a51263954a89a.tar.bz2
upstream-f77a9849c03c30784e59f4c2a03a51263954a89a.zip
add ppp ipv6 patch by farnz (from #2525)
SVN-Revision: 9508
Diffstat (limited to 'package/ppp/files/etc')
-rw-r--r--package/ppp/files/etc/ppp/ipv6-down16
-rw-r--r--package/ppp/files/etc/ppp/ipv6-up16
2 files changed, 30 insertions, 2 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
diff --git a/package/ppp/files/etc/ppp/ipv6-up b/package/ppp/files/etc/ppp/ipv6-up
index e349471524..9ece44ad83 100644
--- a/package/ppp/files/etc/ppp/ipv6-up
+++ b/package/ppp/files/etc/ppp/ipv6-up
@@ -1,2 +1,16 @@
#!/bin/sh
-route -A inet6 add default $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 add default gw ${gw} dev ${dev}
+fi