aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcin Jurkowski <marcin1j@gmail.com>2016-10-17 02:38:42 +0200
committerJohn Crispin <john@phrozen.org>2016-10-26 12:37:46 +0200
commitc560d25d19bd5a9412a4672cacf2a9f2ed601897 (patch)
treed23b33bb59d684c21680377596446bd39ff26285
parentd2606107ab34115482838e4e114d963b0e1cb1c0 (diff)
downloadupstream-c560d25d19bd5a9412a4672cacf2a9f2ed601897.tar.gz
upstream-c560d25d19bd5a9412a4672cacf2a9f2ed601897.tar.bz2
upstream-c560d25d19bd5a9412a4672cacf2a9f2ed601897.zip
comgt: add metric, defaultroute and peerdns options for ncm protocol
Adds generic network options for ncm protocol dynamic interfaces as suggested by Felix in http://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>
-rw-r--r--package/network/utils/comgt/files/ncm.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/package/network/utils/comgt/files/ncm.sh b/package/network/utils/comgt/files/ncm.sh
index 571cfaa28b..1f4d8a4e77 100644
--- a/package/network/utils/comgt/files/ncm.sh
+++ b/package/network/utils/comgt/files/ncm.sh
@@ -19,6 +19,7 @@ proto_ncm_init_config() {
proto_config_add_string mode
proto_config_add_string pdptype
proto_config_add_boolean ipv6
+ proto_config_add_defaults
}
proto_ncm_setup() {
@@ -26,8 +27,8 @@ proto_ncm_setup() {
local manufacturer initialize setmode connect ifname devname devpath
- local device apn auth username password pincode delay mode pdptype ipv6
- json_get_vars device apn auth username password pincode delay mode pdptype ipv6
+ local device apn auth username password pincode delay mode pdptype ipv6 $PROTO_DEFAULT_OPTIONS
+ json_get_vars device apn auth username password pincode delay mode pdptype ipv6 $PROTO_DEFAULT_OPTIONS
if [ "$ipv6" = 0 ]; then
ipv6=""
@@ -141,6 +142,7 @@ proto_ncm_setup() {
json_add_string name "${interface}_4"
json_add_string ifname "@$interface"
json_add_string proto "dhcp"
+ proto_add_dynamic_defaults
ubus call network add_dynamic "$(json_dump)"
[ -n "$ipv6" ] && {
@@ -149,6 +151,7 @@ proto_ncm_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)"
}
}