local tid=2
local ret
- local device apn pincode delay allow_roaming allow_partner dhcp dhcpv6 pdptype $PROTO_DEFAULT_OPTIONS
- json_get_vars device apn pincode delay auth username password allow_roaming allow_partner dhcp dhcpv6 pdptype $PROTO_DEFAULT_OPTIONS
+ local device apn pincode delay auth username password allow_roaming allow_partner
+ local dhcp dhcpv6 pdptype ip4table ip6table $PROTO_DEFAULT_OPTIONS
+ json_get_vars device apn pincode delay auth username password allow_roaming allow_partner
+ json_get_vars dhcp dhcpv6 pdptype ip4table ip6table $PROTO_DEFAULT_OPTIONS
[ ! -e /proc/sys/net/ipv6 ] && ipv6=0 || json_get_var ipv6 ipv6
json_close_array
proto_add_dynamic_defaults
[ -n "$zone" ] && json_add_string zone "$zone"
+ [ -n "$ip4table" ] && json_add_string ip4table "$ip4table"
json_close_object
ubus call network add_dynamic "$(json_dump)"
elif [ "$dhcp" != 0 ]; then
json_add_string proto "dhcp"
proto_add_dynamic_defaults
[ -n "$zone" ] && json_add_string zone "$zone"
+ [ -n "$ip4table" ] && json_add_string ip4table "$ip4table"
json_close_object
ubus call network add_dynamic "$(json_dump)"
fi
json_close_array
proto_add_dynamic_defaults
[ -n "$zone" ] && json_add_string zone "$zone"
+ [ -n "$ip6table" ] && json_add_string ip6table "$ip6table"
json_close_object
ubus call network add_dynamic "$(json_dump)"
elif [ "$dhcpv6" != 0 ]; then
json_add_string extendprefix 1
proto_add_dynamic_defaults
[ -n "$zone" ] && json_add_string zone "$zone"
+ [ -n "$ip6table" ] && json_add_string ip6table "$ip6table"
json_close_object
ubus call network add_dynamic "$(json_dump)"
fi