From d62770f5492028d5543ac4fe2165d68dfbb31b63 Mon Sep 17 00:00:00 2001 From: nbd Date: Wed, 7 Nov 2007 13:24:10 +0000 Subject: add ppp ipv6 patch by farnz (from #2525) git-svn-id: svn://svn.openwrt.org/openwrt/trunk@9508 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/ppp/files/etc/ppp/ipv6-down | 16 +++++++++++++++- package/ppp/files/etc/ppp/ipv6-up | 16 +++++++++++++++- 2 files changed, 30 insertions(+), 2 deletions(-) (limited to 'package/ppp/files/etc') diff --git a/package/ppp/files/etc/ppp/ipv6-down b/package/ppp/files/etc/ppp/ipv6-down index 76678de72..a4e0491a8 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 e34947152..9ece44ad8 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 -- cgit v1.2.3