proto_close_data
proto_send_update "$interface"
+ local zone="$(fw3 -q network "$interface" 2>/dev/null)"
+
[ "$pdptype" = "IP" -o "$pdptype" = "IPV4V6" ] && {
json_init
json_add_string name "${interface}_4"
json_add_string ifname "@$interface"
json_add_string proto "dhcp"
proto_add_dynamic_defaults
+ [ -n "$zone" ] && {
+ json_add_string zone "$zone"
+ }
+ json_close_object
ubus call network add_dynamic "$(json_dump)"
}
json_add_string proto "dhcpv6"
json_add_string extendprefix 1
proto_add_dynamic_defaults
+ [ -n "$zone" ] && {
+ json_add_string zone "$zone"
+ }
+ json_close_object
ubus call network add_dynamic "$(json_dump)"
}
}
proto_close_data
proto_send_update "$interface"
+
+ local zone="$(fw3 -q network "$interface" 2>/dev/null)"
+
[ -n "$pdh_6" ] && {
if [ -z "$dhcpv6" -o "$dhcpv6" = 0 ]; then
json_load "$(uqmi -s -d $device --set-client-id wds,$cid_6 --get-current-settings)"
proto_add_dns_server "$dns1_6"
proto_add_dns_server "$dns2_6"
}
+ [ -n "$zone" ] && {
+ proto_add_data
+ json_add_string zone "$zone"
+ proto_close_data
+ }
proto_send_update "$interface"
else
json_init
proto_add_dynamic_defaults
# RFC 7278: Extend an IPv6 /64 Prefix to LAN
json_add_string extendprefix 1
+ [ -n "$zone" ] && json_add_string zone "$zone"
json_close_object
ubus call network add_dynamic "$(json_dump)"
fi
json_add_string proto "dhcp"
[ -n "$ip4table" ] && json_add_string ip4table "$ip4table"
proto_add_dynamic_defaults
+ [ -n "$zone" ] && json_add_string zone "$zone"
json_close_object
ubus call network add_dynamic "$(json_dump)"
}