aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/utils/umbim
diff options
context:
space:
mode:
authorMarcin Jurkowski <marcin1j@gmail.com>2016-10-17 02:46:29 +0200
committerJohn Crispin <john@phrozen.org>2016-10-26 12:37:46 +0200
commit35129469ca7dd06d092f54971c5861fd549b4660 (patch)
tree1f976681e126935a6f2f75e787ece91c81151784 /package/network/utils/umbim
parent72eb2b8e22b92839b2e5bb0db86eb8be27790a72 (diff)
downloadupstream-35129469ca7dd06d092f54971c5861fd549b4660.tar.gz
upstream-35129469ca7dd06d092f54971c5861fd549b4660.tar.bz2
upstream-35129469ca7dd06d092f54971c5861fd549b4660.zip
mbim: add metric, defaultroute and peerdns options for mbim protocol
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>
Diffstat (limited to 'package/network/utils/umbim')
-rwxr-xr-xpackage/network/utils/umbim/files/lib/netifd/proto/mbim.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/package/network/utils/umbim/files/lib/netifd/proto/mbim.sh b/package/network/utils/umbim/files/lib/netifd/proto/mbim.sh
index f8b2c06b67..9b5729a7ab 100755
--- a/package/network/utils/umbim/files/lib/netifd/proto/mbim.sh
+++ b/package/network/utils/umbim/files/lib/netifd/proto/mbim.sh
@@ -17,6 +17,7 @@ proto_mbim_init_config() {
proto_config_add_string auth
proto_config_add_string username
proto_config_add_string password
+ proto_config_add_defaults
}
_proto_mbim_setup() {
@@ -24,8 +25,8 @@ _proto_mbim_setup() {
local tid=2
local ret
- 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
@@ -130,6 +131,7 @@ _proto_mbim_setup() {
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)"
@@ -138,6 +140,7 @@ _proto_mbim_setup() {
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)"
}