mirror of
https://github.com/openwrt/openwrt.git
synced 2025-02-20 17:32:57 +00:00
umbim: respect 'Enable IPv6 negotiation' option
Don't bring IPv6 part of interface up if it's disabled, or system does not support it. Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
This commit is contained in:
parent
ca8df8a992
commit
e2655e0a6b
@ -19,6 +19,7 @@ proto_mbim_init_config() {
|
||||
proto_config_add_string auth
|
||||
proto_config_add_string username
|
||||
proto_config_add_string password
|
||||
[ -e /proc/sys/net/ipv6 ] && proto_config_add_string ipv6
|
||||
proto_config_add_boolean dhcp
|
||||
proto_config_add_boolean dhcpv6
|
||||
proto_config_add_string pdptype
|
||||
@ -33,6 +34,8 @@ _proto_mbim_setup() {
|
||||
local device apn pincode delay allow_roaming allow_partner dhcp dhcpv6 pdptype $PROTO_DEFAULT_OPTIONS
|
||||
json_get_vars device apn pincode delay auth username password allow_roaming allow_partner dhcp dhcpv6 pdptype $PROTO_DEFAULT_OPTIONS
|
||||
|
||||
[ ! -e /proc/sys/net/ipv6 ] && ipv6=0 || json_get_var ipv6 ipv6
|
||||
|
||||
[ -n "$ctl_device" ] && device=$ctl_device
|
||||
|
||||
[ -n "$device" ] || {
|
||||
@ -150,6 +153,7 @@ _proto_mbim_setup() {
|
||||
tid=$((tid + 1))
|
||||
|
||||
pdptype=$(echo "$pdptype" | awk '{print tolower($0)}')
|
||||
[ "$ipv6" = 0 ] && pdptype="ipv4"
|
||||
|
||||
local req_pdptype="" # Pass "default" PDP type to umbim if unconfigured
|
||||
[ "$pdptype" = "ipv4" -o "$pdptype" = "ipv6" -o "$pdptype" = "ipv4v6" ] && req_pdptype="$pdptype:"
|
||||
|
Loading…
x
Reference in New Issue
Block a user