aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/ipv6/odhcp6c/files
diff options
context:
space:
mode:
authorSteven Barth <cyrus@openwrt.org>2013-05-13 17:12:25 +0000
committerSteven Barth <cyrus@openwrt.org>2013-05-13 17:12:25 +0000
commitad93a571c6abb82d3ddcc9200388c7839712a0e5 (patch)
tree6d4dfc70978378e5b4a08ca5a5183ae54e56f74f /package/network/ipv6/odhcp6c/files
parent973dad61b0be42c175692350db232cb0d44214d0 (diff)
downloadupstream-ad93a571c6abb82d3ddcc9200388c7839712a0e5.tar.gz
upstream-ad93a571c6abb82d3ddcc9200388c7839712a0e5.tar.bz2
upstream-ad93a571c6abb82d3ddcc9200388c7839712a0e5.zip
odhcp6c: added support for DS-Lite + various fixes
SVN-Revision: 36625
Diffstat (limited to 'package/network/ipv6/odhcp6c/files')
-rwxr-xr-xpackage/network/ipv6/odhcp6c/files/dhcpv6.script14
-rwxr-xr-xpackage/network/ipv6/odhcp6c/files/dhcpv6.sh5
2 files changed, 17 insertions, 2 deletions
diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.script b/package/network/ipv6/odhcp6c/files/dhcpv6.script
index c81ffee65d..324a823ce9 100755
--- a/package/network/ipv6/odhcp6c/files/dhcpv6.script
+++ b/package/network/ipv6/odhcp6c/files/dhcpv6.script
@@ -69,6 +69,20 @@ setup_interface () {
proto_send_update "$INTERFACE"
+ if [ -n "$AFTR_IP " -a -n "$IFACE_DSLITE" ]; then
+uci -q batch <<-EOF >/dev/null
+set network.$IFACE_DSLITE.proto=dslite
+set network.$IFACE_DSLITE.auto=0
+set network.$IFACE_DSLITE.peeraddr=$AFTR_IP
+set network.$IFACE_DSLITE.tunlink=$INTERFACE
+commit network
+EOF
+
+ ifdown "$IFACE_DSLITE"
+ /etc/init.d/network reload
+ ifup "$IFACE_DSLITE"
+ fi
+
# TODO: $SNTP_IP $SIP_IP $SNTP_FQDN $SIP_DOMAIN
}
diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.sh b/package/network/ipv6/odhcp6c/files/dhcpv6.sh
index 6cf7521fe0..b2264ed907 100755
--- a/package/network/ipv6/odhcp6c/files/dhcpv6.sh
+++ b/package/network/ipv6/odhcp6c/files/dhcpv6.sh
@@ -18,8 +18,8 @@ proto_dhcpv6_setup() {
local config="$1"
local iface="$2"
- local reqaddress reqprefix clientid reqopts noslaaconly norelease ip6prefix
- json_get_vars reqaddress reqprefix clientid reqopts noslaaconly norelease ip6prefix
+ local reqaddress reqprefix clientid reqopts noslaaconly norelease ip6prefix iface_dslite
+ json_get_vars reqaddress reqprefix clientid reqopts noslaaconly norelease ip6prefix iface_dslite
# Configure
@@ -40,6 +40,7 @@ proto_dhcpv6_setup() {
done
[ -n "$ip6prefix" ] && proto_export "USERPREFIX=$ip6prefix"
+ [ -n "$iface_dslite" ] && proto_export "IFACE_DSLITE=$iface_dslite"
proto_export "INTERFACE=$config"
proto_run_command "$config" odhcp6c \