[openwrt/openwrt] qmi: add delegate option support

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


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

commit a97b7af33e7fc6c8a4e6920f32d402c5683a36ff
Author: Chen Minqiang <ptpt52 at gmail.com>
AuthorDate: Wed May 15 22:48:32 2024 +0800

    qmi: add delegate option support
    
    Ipv6 delegate option is not respected by proto qmi
    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/uqmi/Makefile                      | 2 +-
 package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/package/network/utils/uqmi/Makefile b/package/network/utils/uqmi/Makefile
index b0433da96a..54e1b4fc7b 100644
--- a/package/network/utils/uqmi/Makefile
+++ b/package/network/utils/uqmi/Makefile
@@ -1,7 +1,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=uqmi
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/uqmi.git
diff --git a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh
index bec46325bc..8ec577a90b 100755
--- a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh
+++ b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh
@@ -24,6 +24,7 @@ proto_qmi_init_config() {
 	proto_config_add_boolean dhcp
 	proto_config_add_boolean dhcpv6
 	proto_config_add_boolean sourcefilter
+	proto_config_add_boolean delegate
 	proto_config_add_boolean autoconnect
 	proto_config_add_int plmn
 	proto_config_add_int timeout
@@ -42,7 +43,7 @@ proto_qmi_setup() {
 	local profile_pdptype
 
 	json_get_vars device apn v6apn auth username password pincode delay modes
-	json_get_vars pdptype profile v6profile dhcp dhcpv6 sourcefilter autoconnect plmn ip4table
+	json_get_vars pdptype profile v6profile dhcp dhcpv6 sourcefilter delegate autoconnect plmn ip4table
 	json_get_vars ip6table timeout mtu $PROTO_DEFAULT_OPTIONS
 
 	[ "$timeout" = "" ] && timeout="10"
@@ -442,6 +443,7 @@ proto_qmi_setup() {
 			proto_add_dynamic_defaults
 			# RFC 7278: Extend an IPv6 /64 Prefix to LAN
 			json_add_string extendprefix 1
+			[ "$delegate" = "0" ] && json_add_boolean delegate "0"
 			[ "$sourcefilter" = "0" ] && json_add_boolean sourcefilter "0"
 			[ -n "$zone" ] && json_add_string zone "$zone"
 			json_close_object




More information about the lede-commits mailing list