[openwrt/openwrt] mbim: add delegate option support

LEDE Commits lede-commits at lists.infradead.org
Sun Sep 22 14:45:54 PDT 2024


hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/72d9e4fc31a1e6cc8f00c1b8d7366bf2efc13f9e

commit 72d9e4fc31a1e6cc8f00c1b8d7366bf2efc13f9e
Author: Chen Minqiang <ptpt52 at gmail.com>
AuthorDate: Wed May 15 22:43:03 2024 +0800

    mbim: add delegate option support
    
    Ipv6 delegate option is not respected by proto mbim
    this add support for it.
    
    Signed-off-by: Chen Minqiang <ptpt52 at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/15508
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/network/utils/umbim/Makefile                       | 2 +-
 package/network/utils/umbim/files/lib/netifd/proto/mbim.sh | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/package/network/utils/umbim/Makefile b/package/network/utils/umbim/Makefile
index 5b0a5a8f7d..39c30d71c4 100644
--- a/package/network/utils/umbim/Makefile
+++ b/package/network/utils/umbim/Makefile
@@ -1,7 +1,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=umbim
-PKG_RELEASE:=24
+PKG_RELEASE:=25
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/umbim.git
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 f2d4c436e8..75b914e8aa 100755
--- a/package/network/utils/umbim/files/lib/netifd/proto/mbim.sh
+++ b/package/network/utils/umbim/files/lib/netifd/proto/mbim.sh
@@ -23,6 +23,7 @@ proto_mbim_init_config() {
 	proto_config_add_string dhcp
 	proto_config_add_string dhcpv6
 	proto_config_add_boolean sourcefilter
+	proto_config_add_boolean delegate
 	proto_config_add_string pdptype
 	proto_config_add_int mtu
 	proto_config_add_defaults
@@ -48,7 +49,7 @@ _proto_mbim_setup() {
 	local device apn pincode delay auth username password allow_roaming allow_partner
 	local dhcp dhcpv6 pdptype ip4table ip6table mtu $PROTO_DEFAULT_OPTIONS
 	json_get_vars device apn pincode delay auth username password allow_roaming allow_partner
-	json_get_vars dhcp dhcpv6 sourcefilter pdptype ip4table ip6table mtu $PROTO_DEFAULT_OPTIONS
+	json_get_vars dhcp dhcpv6 sourcefilter delegate pdptype ip4table ip6table mtu $PROTO_DEFAULT_OPTIONS
 
 	[ ! -e /proc/sys/net/ipv6 ] && ipv6=0 || json_get_var ipv6 ipv6
 
@@ -264,6 +265,7 @@ _proto_mbim_setup() {
 			echo "mbim[$$]" "Starting DHCPv6 on $ifname"
 			json_add_string proto "dhcpv6"
 			json_add_string extendprefix 1
+			[ "$delegate" = "0" ] && json_add_boolean delegate "0"
 			[ "$sourcefilter" = "0" ] && json_add_boolean sourcefilter "0"
 		fi
 




More information about the lede-commits mailing list