1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-12-18 14:07:10 +02:00

add ppp ipv6 patch by farnz (from #2525)

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@9508 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd 2007-11-07 13:24:10 +00:00
parent 7c6c1d877e
commit d62770f549
4 changed files with 37 additions and 2 deletions

View File

@ -134,6 +134,8 @@ define Package/ppp/install
$(INSTALL_DIR) $(1)/etc/ppp/ip-up.d $(INSTALL_DIR) $(1)/etc/ppp/ip-up.d
$(INSTALL_BIN) ./files/etc/ppp/ip-down $(1)/etc/ppp/ $(INSTALL_BIN) ./files/etc/ppp/ip-down $(1)/etc/ppp/
$(INSTALL_DIR) $(1)/etc/ppp/ip-down.d $(INSTALL_DIR) $(1)/etc/ppp/ip-down.d
$(INSTALL_BIN) ./files/etc/ppp/ipv6-up $(1)/etc/ppp/
$(INSTALL_BIN) ./files/etc/ppp/ipv6-down $(1)/etc/ppp/
$(INSTALL_DATA) ./files/etc/ppp/options $(1)/etc/ppp/ $(INSTALL_DATA) ./files/etc/ppp/options $(1)/etc/ppp/
ln -sf /tmp/resolv.conf.auto $(1)/etc/ppp/resolv.conf ln -sf /tmp/resolv.conf.auto $(1)/etc/ppp/resolv.conf
endef endef

View File

@ -1,2 +1,16 @@
#!/bin/sh #!/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

View File

@ -1,2 +1,16 @@
#!/bin/sh #!/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

View File

@ -37,6 +37,10 @@ start_pppd() {
config_get demand "$cfg" demand config_get demand "$cfg" demand
[ -n "$demand" ] && echo "nameserver 1.1.1.1" > /tmp/resolv.conf.auto [ -n "$demand" ] && echo "nameserver 1.1.1.1" > /tmp/resolv.conf.auto
config_get_bool ipv6 "$cfg" ipv6 0
[ "$ipv6" -eq 1 ] && ipv6="+ipv6" || ipv6=""
/usr/sbin/pppd "$@" \ /usr/sbin/pppd "$@" \
${keepalive:+lcp-echo-interval $interval lcp-echo-failure ${keepalive%%[, ]*}} \ ${keepalive:+lcp-echo-interval $interval lcp-echo-failure ${keepalive%%[, ]*}} \
${demand:+precompiled-active-filter /etc/ppp/filter demand idle }${demand:-persist} \ ${demand:+precompiled-active-filter /etc/ppp/filter demand idle }${demand:-persist} \
@ -48,6 +52,7 @@ start_pppd() {
ipparam "$cfg" \ ipparam "$cfg" \
${connect:+connect "$connect"} \ ${connect:+connect "$connect"} \
${disconnect:+disconnect "$disconnect"} \ ${disconnect:+disconnect "$disconnect"} \
${ipv6} \
${pppd_options} ${pppd_options}
lock -u "/var/lock/ppp-${cfg}" lock -u "/var/lock/ppp-${cfg}"