6rd / ds-lite: make the firewall-zones of nested-protocols configurable
[openwrt/staging/chunkeey.git] / package / network / config / netifd / files / lib / netifd / proto / dhcp.sh
index 80c3562e69a36e380738ab6af68f53411fe86867..93f4a5e09a5cf0b9fe4be98811ff519a69325c80 100755 (executable)
@@ -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"