projects
/
librecmc
/
librecmc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5bc6d1c
)
add ppp ipv6 patch by farnz (from #2525)
author
Felix Fietkau
<nbd@openwrt.org>
Wed, 7 Nov 2007 13:24:10 +0000
(13:24 +0000)
committer
Felix Fietkau
<nbd@openwrt.org>
Wed, 7 Nov 2007 13:24:10 +0000
(13:24 +0000)
SVN-Revision: 9508
package/ppp/Makefile
patch
|
blob
|
history
package/ppp/files/etc/ppp/ipv6-down
patch
|
blob
|
history
package/ppp/files/etc/ppp/ipv6-up
patch
|
blob
|
history
package/ppp/files/ppp.sh
patch
|
blob
|
history
diff --git
a/package/ppp/Makefile
b/package/ppp/Makefile
index ee58f72e479d129dd772eaa6ca973189ee943be1..b8b08d8610b0959e879a8a7db6197af9b204d03e 100644
(file)
--- a/
package/ppp/Makefile
+++ b/
package/ppp/Makefile
@@
-134,6
+134,8
@@
define Package/ppp/install
$(INSTALL_DIR) $(1)/etc/ppp/ip-up.d
$(INSTALL_BIN) ./files/etc/ppp/ip-down $(1)/etc/ppp/
$(INSTALL_DIR) $(1)/etc/ppp/ip-down.d
$(INSTALL_DIR) $(1)/etc/ppp/ip-up.d
$(INSTALL_BIN) ./files/etc/ppp/ip-down $(1)/etc/ppp/
$(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/
ln -sf /tmp/resolv.conf.auto $(1)/etc/ppp/resolv.conf
endef
$(INSTALL_DATA) ./files/etc/ppp/options $(1)/etc/ppp/
ln -sf /tmp/resolv.conf.auto $(1)/etc/ppp/resolv.conf
endef
diff --git
a/package/ppp/files/etc/ppp/ipv6-down
b/package/ppp/files/etc/ppp/ipv6-down
index 76678de72ce160db33eca39f9ceceb4b335c5fc2..a4e0491a8098f8cf81de5f8b407176a31ec98a3d 100644
(file)
--- a/
package/ppp/files/etc/ppp/ipv6-down
+++ b/
package/ppp/files/etc/ppp/ipv6-down
@@
-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
diff --git
a/package/ppp/files/etc/ppp/ipv6-up
b/package/ppp/files/etc/ppp/ipv6-up
index e349471524389f1dfc03b7ced3c15d27793afb06..9ece44ad834b8891ecddb56a776e96b8e4ac5730 100644
(file)
--- a/
package/ppp/files/etc/ppp/ipv6-up
+++ b/
package/ppp/files/etc/ppp/ipv6-up
@@
-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
diff --git
a/package/ppp/files/ppp.sh
b/package/ppp/files/ppp.sh
index 5ca1cf9c7d3ecf56eae4c6613ddeeb038791ceb8..339b4e73e89cbc1a96546edb3006a2f2cbc4ffc3 100644
(file)
--- a/
package/ppp/files/ppp.sh
+++ b/
package/ppp/files/ppp.sh
@@
-37,6
+37,10
@@
start_pppd() {
config_get demand "$cfg" demand
[ -n "$demand" ] && echo "nameserver 1.1.1.1" > /tmp/resolv.conf.auto
config_get demand "$cfg" demand
[ -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 "$@" \
${keepalive:+lcp-echo-interval $interval lcp-echo-failure ${keepalive%%[, ]*}} \
${demand:+precompiled-active-filter /etc/ppp/filter demand idle }${demand:-persist} \
/usr/sbin/pppd "$@" \
${keepalive:+lcp-echo-interval $interval lcp-echo-failure ${keepalive%%[, ]*}} \
${demand:+precompiled-active-filter /etc/ppp/filter demand idle }${demand:-persist} \
@@
-48,6
+52,7
@@
start_pppd() {
ipparam "$cfg" \
${connect:+connect "$connect"} \
${disconnect:+disconnect "$disconnect"} \
ipparam "$cfg" \
${connect:+connect "$connect"} \
${disconnect:+disconnect "$disconnect"} \
+ ${ipv6} \
${pppd_options}
lock -u "/var/lock/ppp-${cfg}"
${pppd_options}
lock -u "/var/lock/ppp-${cfg}"