[openwrt/openwrt] qmi: add sourcefilter option support

LEDE Commits lede-commits at lists.infradead.org
Tue Apr 16 21:35:15 PDT 2024


981213 pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/44a3c18a31a2a40cd502261016dc60433006cae8

commit 44a3c18a31a2a40cd502261016dc60433006cae8
Author: Chen Minqiang <ptpt52 at gmail.com>
AuthorDate: Mon Jan 22 23:00:03 2024 +0800

    qmi: add sourcefilter option support
    
    This make source based IPv6 routing option available for qmi
    
    Signed-off-by: Chen Minqiang <ptpt52 at gmail.com>
---
 package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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 49fd87ff9d..bec46325bc 100755
--- a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh
+++ b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh
@@ -23,6 +23,7 @@ proto_qmi_init_config() {
 	proto_config_add_int v6profile
 	proto_config_add_boolean dhcp
 	proto_config_add_boolean dhcpv6
+	proto_config_add_boolean sourcefilter
 	proto_config_add_boolean autoconnect
 	proto_config_add_int plmn
 	proto_config_add_int timeout
@@ -41,7 +42,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 autoconnect plmn ip4table
+	json_get_vars pdptype profile v6profile dhcp dhcpv6 sourcefilter autoconnect plmn ip4table
 	json_get_vars ip6table timeout mtu $PROTO_DEFAULT_OPTIONS
 
 	[ "$timeout" = "" ] && timeout="10"
@@ -441,6 +442,7 @@ proto_qmi_setup() {
 			proto_add_dynamic_defaults
 			# RFC 7278: Extend an IPv6 /64 Prefix to LAN
 			json_add_string extendprefix 1
+			[ "$sourcefilter" = "0" ] && json_add_boolean sourcefilter "0"
 			[ -n "$zone" ] && json_add_string zone "$zone"
 			json_close_object
 			ubus call network add_dynamic "$(json_dump)"




More information about the lede-commits mailing list