[openwrt/openwrt] umbim: use IP configuration provided by MBIM by default

LEDE Commits lede-commits at lists.infradead.org
Sat Apr 29 12:39:07 PDT 2023


hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/9bb4b9a968ab72aaca199a6c21b29adbeb83a839

commit 9bb4b9a968ab72aaca199a6c21b29adbeb83a839
Author: Lech Perczak <lech.perczak at gmail.com>
AuthorDate: Mon Jul 19 19:04:09 2021 +0200

    umbim: use IP configuration provided by MBIM by default
    
    Previously, DHCP was used. According to MBIM Specification v1.0 errata 1 [1],
    section 10.5.20, MBIM_CID_IP_CONFIGURATION,
    if MBIM information element containing IP configuration is available,
    host shall use it, and fall back to in-band mechanisms to acquire it therwise -
    therefore make static configuration the default.
    
    [1] https://www.usb.org/document-library/mobile-broadband-interface-model-v10-errata-1-and-adopters-agreement
    
    Signed-off-by: Lech Perczak <lech.perczak at gmail.com>
---
 package/network/utils/umbim/files/lib/netifd/proto/mbim.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 c5f3663271..3867411818 100755
--- a/package/network/utils/umbim/files/lib/netifd/proto/mbim.sh
+++ b/package/network/utils/umbim/files/lib/netifd/proto/mbim.sh
@@ -169,7 +169,7 @@ _proto_mbim_setup() {
 
 	echo "mbim[$$]" "Connected"
 
-	if [ "$dhcp" = 0 ]; then
+	if [ -z "$dhcp" -o "$dhcp" = 0 ]; then
 		echo "mbim[$$]" "Setting up $ifname"
 		eval $(umbim $DBG -n -t $tid -d $device config | sed 's/: /=/g')
 		tid=$((tid + 1))




More information about the lede-commits mailing list