2
0
forked from Ivasoft/openwrt

6rd / ds-lite: make the firewall-zones of nested-protocols configurable

SVN-Revision: 40020
This commit is contained in:
Steven Barth
2014-03-26 10:12:49 +00:00
parent 2a893c2057
commit 0555ebf66d
9 changed files with 28 additions and 12 deletions

View File

@@ -54,6 +54,7 @@ setup_interface () {
json_add_int ip6prefixlen "$ip6rdprefixlen"
json_add_string tunlink "$INTERFACE"
[ -n "$IFACE6RD_DELEGATE" ] && json_add_boolean delegate "$IFACE6RD_DELEGATE"
[ -n "$ZONE6RD" ] && json_add_string zone "$ZONE6RD"
json_close_object
ubus call network add_dynamic "$(json_dump)"

View File

@@ -15,14 +15,15 @@ proto_dhcp_init_config() {
proto_config_add_string iface6rd
proto_config_add_string sendopts
proto_config_add_boolean delegate
proto_config_add_string zone6rd
}
proto_dhcp_setup() {
local config="$1"
local iface="$2"
local ipaddr hostname clientid vendorid broadcast reqopts iface6rd sendopts delegate
json_get_vars ipaddr hostname clientid vendorid broadcast reqopts iface6rd sendopts delegate
local ipaddr hostname clientid vendorid broadcast reqopts iface6rd sendopts delegate zone6rd
json_get_vars ipaddr hostname clientid vendorid broadcast reqopts iface6rd sendopts delegate zone6rd
local opt dhcpopts
for opt in $reqopts; do
@@ -37,6 +38,7 @@ proto_dhcp_setup() {
[ -n "$clientid" ] && clientid="-x 0x3d:${clientid//:/}" || clientid="-C"
[ -n "$iface6rd" ] && proto_export "IFACE6RD=$iface6rd"
[ -n "$iface6rd" ] && append dhcpopts "-O 212"
[ -n "$zone6rd" ] && proto_export "ZONE6RD=$zone6rd"
[ "$delegate" = "0" ] && proto_export "IFACE6RD_DELEGATE=0"
proto_export "INTERFACE=$config"