[openwrt/openwrt] mbim: add sourcefilter option support

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


981213 pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/044fb8fc133cb0bf6ff0e3c723538f0958838a73

commit 044fb8fc133cb0bf6ff0e3c723538f0958838a73
Author: Chen Minqiang <ptpt52 at gmail.com>
AuthorDate: Mon Jan 22 22:59:44 2024 +0800

    mbim: add sourcefilter option support
    
    This make source based IPv6 routing option available for mbim
    
    Signed-off-by: Chen Minqiang <ptpt52 at gmail.com>
---
 package/network/utils/umbim/files/lib/netifd/proto/mbim.sh | 4 +++-
 1 file changed, 3 insertions(+), 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 50913e7fa0..f2d4c436e8 100755
--- a/package/network/utils/umbim/files/lib/netifd/proto/mbim.sh
+++ b/package/network/utils/umbim/files/lib/netifd/proto/mbim.sh
@@ -22,6 +22,7 @@ proto_mbim_init_config() {
 	[ -e /proc/sys/net/ipv6 ] && proto_config_add_string ipv6
 	proto_config_add_string dhcp
 	proto_config_add_string dhcpv6
+	proto_config_add_boolean sourcefilter
 	proto_config_add_string pdptype
 	proto_config_add_int mtu
 	proto_config_add_defaults
@@ -47,7 +48,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 pdptype ip4table ip6table mtu $PROTO_DEFAULT_OPTIONS
+	json_get_vars dhcp dhcpv6 sourcefilter pdptype ip4table ip6table mtu $PROTO_DEFAULT_OPTIONS
 
 	[ ! -e /proc/sys/net/ipv6 ] && ipv6=0 || json_get_var ipv6 ipv6
 
@@ -263,6 +264,7 @@ _proto_mbim_setup() {
 			echo "mbim[$$]" "Starting DHCPv6 on $ifname"
 			json_add_string proto "dhcpv6"
 			json_add_string extendprefix 1
+			[ "$sourcefilter" = "0" ] && json_add_boolean sourcefilter "0"
 		fi
 
 		[ "$peerdns" = 0 -a "$dhcpv6" != 1 ] || {




More information about the lede-commits mailing list