diff options
author | Steven Barth <cyrus@openwrt.org> | 2013-02-12 08:23:54 +0000 |
---|---|---|
committer | Steven Barth <cyrus@openwrt.org> | 2013-02-12 08:23:54 +0000 |
commit | 99b69fd9c5a5645f2894da031832b9cfd8d4ab8e (patch) | |
tree | 194f12132387b43477b3cbbfc219255b9b7d41f4 /package/network/ipv6/odhcp6c/files/dhcpv6.sh | |
parent | eeaf2c0b5a987e586d895ba9cad22461c91abbf4 (diff) | |
download | mtk-20170518-99b69fd9c5a5645f2894da031832b9cfd8d4ab8e.zip mtk-20170518-99b69fd9c5a5645f2894da031832b9cfd8d4ab8e.tar.gz mtk-20170518-99b69fd9c5a5645f2894da031832b9cfd8d4ab8e.tar.bz2 |
odhcp6c: allow setting a user-provided prefix as well
SVN-Revision: 35570
Diffstat (limited to 'package/network/ipv6/odhcp6c/files/dhcpv6.sh')
-rwxr-xr-x | package/network/ipv6/odhcp6c/files/dhcpv6.sh | 6 |
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 4bd3a67..b1837a9 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 \ |