diff options
Diffstat (limited to 'package/network/utils/comgt/files/ncm.sh')
-rw-r--r-- | package/network/utils/comgt/files/ncm.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/package/network/utils/comgt/files/ncm.sh b/package/network/utils/comgt/files/ncm.sh index a2c913ea1d..2f36697487 100644 --- a/package/network/utils/comgt/files/ncm.sh +++ b/package/network/utils/comgt/files/ncm.sh @@ -31,6 +31,8 @@ proto_ncm_setup() { local device ifname apn auth username password pincode delay mode pdptype profile $PROTO_DEFAULT_OPTIONS json_get_vars device ifname apn auth username password pincode delay mode pdptype profile $PROTO_DEFAULT_OPTIONS + local context_type + [ "$metric" = "" ] && metric="0" [ -n "$profile" ] || profile=1 @@ -38,6 +40,10 @@ proto_ncm_setup() { pdptype=$(echo "$pdptype" | awk '{print toupper($0)}') [ "$pdptype" = "IP" -o "$pdptype" = "IPV6" -o "$pdptype" = "IPV4V6" ] || pdptype="IP" + [ "$pdptype" = "IPV4V6" ] && context_type=3 + [ -z "$context_type" -a "$pdptype" = "IPV6" ] && context_type=2 + [ -n "$context_type" ] || context_type=1 + [ -n "$ctl_device" ] && device=$ctl_device [ -n "$device" ] || { |