aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/ipv6/odhcp6c/files/dhcpv6.sh
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2013-02-12 08:23:54 +0000
committerSteven Barth <steven@midlink.org>2013-02-12 08:23:54 +0000
commitd0fe67f1dfe60d22c31033dfd5f2d06c149ddf92 (patch)
treebd511ca8ec525275745df013c2f2b8dbec785576 /package/network/ipv6/odhcp6c/files/dhcpv6.sh
parentb0036a67c3832543065b2486382246138b97a5d4 (diff)
downloadupstream-d0fe67f1dfe60d22c31033dfd5f2d06c149ddf92.tar.gz
upstream-d0fe67f1dfe60d22c31033dfd5f2d06c149ddf92.tar.bz2
upstream-d0fe67f1dfe60d22c31033dfd5f2d06c149ddf92.zip
odhcp6c: allow setting a user-provided prefix as well
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35570 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network/ipv6/odhcp6c/files/dhcpv6.sh')
-rwxr-xr-xpackage/network/ipv6/odhcp6c/files/dhcpv6.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.sh b/package/network/ipv6/odhcp6c/files/dhcpv6.sh
index 4bd3a67ed9..b1837a9c6a 100755
--- a/package/network/ipv6/odhcp6c/files/dhcpv6.sh
+++ b/package/network/ipv6/odhcp6c/files/dhcpv6.sh
@@ -10,14 +10,15 @@ proto_dhcpv6_init_config() {
proto_config_add_string "clientid"
proto_config_add_string "reqopts"
proto_config_add_string "noslaaconly"
+ proto_config_add_string "ip6prefix"
}
proto_dhcpv6_setup() {
local config="$1"
local iface="$2"
- local reqaddress reqprefix clientid reqopts noslaaconly
- json_get_vars reqaddress reqprefix clientid reqopts noslaaconly
+ local reqaddress reqprefix clientid reqopts noslaaconly ip6prefix
+ json_get_vars reqaddress reqprefix clientid reqopts noslaaconly ip6prefix
# Configure
@@ -35,6 +36,7 @@ proto_dhcpv6_setup() {
append opts "-r$opt"
done
+ [ -n "$ip6prefix" ] && proto_export "USERPREFIX=$ip6prefix"
proto_export "INTERFACE=$config"
proto_run_command "$config" odhcp6c \