From c560d25d19bd5a9412a4672cacf2a9f2ed601897 Mon Sep 17 00:00:00 2001 From: Marcin Jurkowski Date: Mon, 17 Oct 2016 02:38:42 +0200 Subject: 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 --- package/network/utils/comgt/files/ncm.sh | 7 +++++-- 1 file 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)" } } -- cgit v1.2.3