Adds generic network options for mbim protocol dynamic interfaces
as suggested by Felix in
https://lists.openwrt.org/pipermail/openwrt-devel/2016-February/039794.html.
This depends on netifd patch https://patchwork.ozlabs.org/patch/686820/.
Signed-off-by: Marcin Jurkowski <marcin1j@gmail.com>
proto_config_add_string auth
proto_config_add_string username
proto_config_add_string password
proto_config_add_string auth
proto_config_add_string username
proto_config_add_string password
+ proto_config_add_defaults
- local device apn pincode delay
- json_get_vars device apn pincode delay auth username password
+ local device apn pincode delay $PROTO_DEFAULT_OPTIONS
+ json_get_vars device apn pincode delay auth username password $PROTO_DEFAULT_OPTIONS
[ -n "$ctl_device" ] && device=$ctl_device
[ -n "$ctl_device" ] && device=$ctl_device
json_add_string name "${interface}_4"
json_add_string ifname "@$interface"
json_add_string proto "dhcp"
json_add_string name "${interface}_4"
json_add_string ifname "@$interface"
json_add_string proto "dhcp"
+ proto_add_dynamic_defaults
json_close_object
ubus call network add_dynamic "$(json_dump)"
json_close_object
ubus call network add_dynamic "$(json_dump)"
json_add_string ifname "@$interface"
json_add_string proto "dhcpv6"
json_add_string extendprefix 1
json_add_string ifname "@$interface"
json_add_string proto "dhcpv6"
json_add_string extendprefix 1
+ proto_add_dynamic_defaults
ubus call network add_dynamic "$(json_dump)"
}
ubus call network add_dynamic "$(json_dump)"
}