diff options
author | Steven Barth <steven@midlink.org> | 2015-09-03 15:53:33 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2015-09-03 15:53:33 +0000 |
commit | 0191d48aaa9909ca2d5f3448913a22dc4de5890a (patch) | |
tree | 584f4508a1dc7e3e66da57826581886f81f0a4ec /package/network/ipv6/odhcp6c | |
parent | 2c17e0ca362364e826877341ec35d933f0b83a6f (diff) | |
download | master-187ad058-0191d48aaa9909ca2d5f3448913a22dc4de5890a.tar.gz master-187ad058-0191d48aaa9909ca2d5f3448913a22dc4de5890a.tar.bz2 master-187ad058-0191d48aaa9909ca2d5f3448913a22dc4de5890a.zip |
odhcp6c: add RFC 7278 3gpp IPv6 prefix extension
Use option extendprefix 1 to enable
Signed-off-by: Steven Barth <steven@midlink.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46779 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network/ipv6/odhcp6c')
-rw-r--r-- | package/network/ipv6/odhcp6c/Makefile | 2 | ||||
-rwxr-xr-x | package/network/ipv6/odhcp6c/files/dhcpv6.script | 5 | ||||
-rwxr-xr-x | package/network/ipv6/odhcp6c/files/dhcpv6.sh | 6 |
3 files changed, 10 insertions, 3 deletions
diff --git a/package/network/ipv6/odhcp6c/Makefile b/package/network/ipv6/odhcp6c/Makefile index aa81e02dca..4968631d6f 100644 --- a/package/network/ipv6/odhcp6c/Makefile +++ b/package/network/ipv6/odhcp6c/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=odhcp6c -PKG_VERSION:=2015-07-29 +PKG_VERSION:=2015-09-03 PKG_RELEASE=$(PKG_SOURCE_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.script b/package/network/ipv6/odhcp6c/files/dhcpv6.script index 677d35f4f9..3177eefbf7 100755 --- a/package/network/ipv6/odhcp6c/files/dhcpv6.script +++ b/package/network/ipv6/odhcp6c/files/dhcpv6.script @@ -77,6 +77,11 @@ setup_interface () { -z "$RA_DNS" -a "$FAKE_ROUTES" = 1 ]; then RA_ROUTES="::/0,$SERVER,$valid,4096" fi + + # RFC 7278 + if [ "$mask" -eq 64 -a -z "$PREFIXES" -a -n "$EXTENDPREFIX" ]; then + proto_add_ipv6_prefix "$entry" + fi done for entry in $RA_ROUTES; do diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.sh b/package/network/ipv6/odhcp6c/files/dhcpv6.sh index 4a453fdc4d..6c47399916 100755 --- a/package/network/ipv6/odhcp6c/files/dhcpv6.sh +++ b/package/network/ipv6/odhcp6c/files/dhcpv6.sh @@ -13,6 +13,7 @@ proto_dhcpv6_init_config() { proto_config_add_string 'reqopts:list(uinteger)' proto_config_add_string 'noslaaconly:bool' proto_config_add_string 'forceprefix:bool' + proto_config_add_string 'extendprefix:bool' proto_config_add_string 'norelease:bool' proto_config_add_string 'ip6prefix:ip6addr' proto_config_add_string iface_dslite @@ -35,8 +36,8 @@ proto_dhcpv6_setup() { local config="$1" local iface="$2" - local reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes sourcefilter - json_get_vars reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes sourcefilter + 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 + 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 # Configure @@ -78,6 +79,7 @@ proto_dhcpv6_setup() { [ -n "$zone" ] && proto_export "ZONE=$zone" [ "$fakeroutes" != "0" ] && proto_export "FAKE_ROUTES=1" [ "$sourcefilter" = "0" ] && proto_export "NOSOURCEFILTER=1" + [ "$extendprefix" = "1" ] && proto_export "EXTENDPREFIX=1" proto_export "INTERFACE=$config" proto_run_command "$config" odhcp6c \ |