aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/ipv6/odhcp6c/files
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2018-01-16 15:59:03 +0100
committerHans Dedecker <dedeckeh@gmail.com>2018-01-18 11:39:42 +0100
commit26045049baf646aa2ce3dce78106da5acf4936ea (patch)
tree3268f3deac02e52583e7afc8649322dd607a99fc /package/network/ipv6/odhcp6c/files
parenteb58b14d27e089d345a66fd8e8c2df995fcac8be (diff)
downloadupstream-26045049baf646aa2ce3dce78106da5acf4936ea.tar.gz
upstream-26045049baf646aa2ce3dce78106da5acf4936ea.tar.bz2
upstream-26045049baf646aa2ce3dce78106da5acf4936ea.zip
odhcp6c: add sendopts config support and update to latest git HEAD
Add sendopts config support allowing to add options in sent DHCPv6 packets. Options can be configured as follows : uci set network.wan6.sendopts="sntpservers:3001:3001::1,3001:3001::2 11:00000000000000000000006674692F 0x3e8:ABCDEF" Based on a patch by Frank Andrieu <fandrieu@gmail.com> See https://git.openwrt.org/?p=project/odhcp6c.git;a=commit;h=510aaf6d528210c5e8a6159f9b80b32615e88c5f for a more detailed description. Latest git changes : 1f93bd4 dhcpv6: rework option passthrough logic a477e95 odhcp6c: rework userclass and vendorclass command handling 510aaf6 odhcp6c: add -x opt:val support ab75be1 treewide: update copyrights to 2018 f3a4609 odhcp6c: let odhcp6c_add_state return a success/failure indication Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'package/network/ipv6/odhcp6c/files')
-rwxr-xr-xpackage/network/ipv6/odhcp6c/files/dhcpv6.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.sh b/package/network/ipv6/odhcp6c/files/dhcpv6.sh
index 56f75521e7..fa3c44c2c4 100755
--- a/package/network/ipv6/odhcp6c/files/dhcpv6.sh
+++ b/package/network/ipv6/odhcp6c/files/dhcpv6.sh
@@ -26,6 +26,7 @@ proto_dhcpv6_init_config() {
proto_config_add_string 'ifaceid:ip6addr'
proto_config_add_string "userclass"
proto_config_add_string "vendorclass"
+ proto_config_add_string "sendopts"
proto_config_add_boolean delegate
proto_config_add_int "soltimeout"
proto_config_add_boolean fakeroutes
@@ -38,8 +39,8 @@ proto_dhcpv6_setup() {
local config="$1"
local iface="$2"
- local reqaddress reqprefix clientid reqopts noslaaconly forceprefix extendprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes sourcefilter keep_ra_dnslifetime ra_holdoff
- json_get_vars reqaddress reqprefix clientid reqopts noslaaconly forceprefix extendprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes sourcefilter keep_ra_dnslifetime ra_holdoff
+ local reqaddress reqprefix clientid reqopts noslaaconly forceprefix extendprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass sendopts delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes sourcefilter keep_ra_dnslifetime ra_holdoff
+ json_get_vars reqaddress reqprefix clientid reqopts noslaaconly forceprefix extendprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass sendopts delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes sourcefilter keep_ra_dnslifetime ra_holdoff
# Configure
@@ -67,10 +68,15 @@ proto_dhcpv6_setup() {
[ -n "$ra_holdoff" ] && append opts "-m$ra_holdoff"
+ local opt
for opt in $reqopts; do
append opts "-r$opt"
done
+ for opt in $sendopts; do
+ append opts "-x$opt"
+ done
+
append opts "-t${soltimeout:-120}"
[ -n "$ip6prefix" ] && proto_export "USERPREFIX=$ip6prefix"