From 79dc555b4838a2cd197cd11bb30ff38f5ab63ec4 Mon Sep 17 00:00:00 2001
From: Andreas Ziegler <dev@andreas-ziegler.de>
Date: Wed, 16 Apr 2025 04:12:14 +0200
Subject: [PATCH] core: remove transitive option from network interfaces

closes #2081
---
 package/gluon-core/files/lib/netifd/proto/gluon_mesh.sh    | 7 ++-----
 package/gluon-core/files/lib/netifd/proto/gluon_wired.sh   | 6 ++----
 .../luasrc/lib/gluon/upgrade/500-mesh-vpn                  | 1 -
 .../files/lib/netifd/proto/gluon_wireguard.sh              | 1 -
 4 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/package/gluon-core/files/lib/netifd/proto/gluon_mesh.sh b/package/gluon-core/files/lib/netifd/proto/gluon_mesh.sh
index fc3d3acf6..2dc7e75c4 100755
--- a/package/gluon-core/files/lib/netifd/proto/gluon_mesh.sh
+++ b/package/gluon-core/files/lib/netifd/proto/gluon_mesh.sh
@@ -8,18 +8,16 @@ init_proto "$@"
 
 proto_gluon_mesh_init_config() {
 	proto_config_add_boolean fixed_mtu
-	proto_config_add_boolean transitive
 }
 
 proto_gluon_mesh_setup() {
 	export CONFIG="$1"
 	export IFNAME="$2"
 
-	local fixed_mtu transitive
-	json_get_vars fixed_mtu transitive
+	local fixed_mtu
+	json_get_vars fixed_mtu
 
 	export FIXED_MTU="${fixed_mtu:-0}"
-	export TRANSITIVE="${transitive:-0}"
 
 	for script in /lib/gluon/core/mesh/setup.d/*; do
 		[ ! -x "$script" ] || "$script"
@@ -29,7 +27,6 @@ proto_gluon_mesh_setup() {
 
 	proto_add_data
 	json_add_boolean fixed_mtu "$FIXED_MTU"
-	json_add_boolean transitive "$TRANSITIVE"
 	[ "$IFNAME" != 'br-wan' ] && json_add_string zone 'mesh'
 	proto_close_data
 	proto_send_update "$CONFIG"
diff --git a/package/gluon-core/files/lib/netifd/proto/gluon_wired.sh b/package/gluon-core/files/lib/netifd/proto/gluon_wired.sh
index 954fef97d..20021ef9a 100755
--- a/package/gluon-core/files/lib/netifd/proto/gluon_wired.sh
+++ b/package/gluon-core/files/lib/netifd/proto/gluon_wired.sh
@@ -7,7 +7,6 @@
 init_proto "$@"
 
 proto_gluon_wired_init_config() {
-	proto_config_add_boolean transitive
 	proto_config_add_int index
 	proto_config_add_boolean vxlan
 	proto_config_add_string vxpeer6addr
@@ -50,8 +49,8 @@ proto_gluon_wired_setup() {
 
 	local meshif="$config"
 
-	local transitive index vxlan vxpeer6addr
-	json_get_vars transitive index vxlan vxpeer6addr
+	local index vxlan vxpeer6addr
+	json_get_vars index vxlan vxpeer6addr
 
 	# default args
 	[ -z "$vxlan" ] && vxlan=1
@@ -83,7 +82,6 @@ proto_gluon_wired_setup() {
 	json_add_string ifname "@${meshif}"
 	json_add_string proto 'gluon_mesh'
 	json_add_boolean fixed_mtu 1
-	[ -n "$transitive" ] && json_add_boolean transitive "$transitive"
 	json_close_object
 	ubus call network add_dynamic "$(json_dump)"
 }
diff --git a/package/gluon-mesh-vpn-core/luasrc/lib/gluon/upgrade/500-mesh-vpn b/package/gluon-mesh-vpn-core/luasrc/lib/gluon/upgrade/500-mesh-vpn
index a753ca90d..d1f105d4c 100755
--- a/package/gluon-mesh-vpn-core/luasrc/lib/gluon/upgrade/500-mesh-vpn
+++ b/package/gluon-mesh-vpn-core/luasrc/lib/gluon/upgrade/500-mesh-vpn
@@ -11,7 +11,6 @@ local _, active_vpn = vpn_core.get_active_provider()
 uci:section('network', 'interface', 'mesh_vpn', {
 	ifname = vpn_core.get_interface(),
 	proto = 'gluon_mesh',
-	transitive = true,
 	fixed_mtu = true,
 	macaddr = util.generate_mac(7),
 	mtu = active_vpn.mtu(),
diff --git a/package/gluon-mesh-vpn-wireguard/files/lib/netifd/proto/gluon_wireguard.sh b/package/gluon-mesh-vpn-wireguard/files/lib/netifd/proto/gluon_wireguard.sh
index 580276aba..f5a421463 100755
--- a/package/gluon-mesh-vpn-wireguard/files/lib/netifd/proto/gluon_wireguard.sh
+++ b/package/gluon-mesh-vpn-wireguard/files/lib/netifd/proto/gluon_wireguard.sh
@@ -58,7 +58,6 @@ proto_gluon_wireguard_setup() {
 	json_add_string ifname "$ifname"
 	json_add_string proto 'wgpeerselector'
 	json_add_string unix_group 'gluon-mesh-vpn'
-	json_add_boolean transitive 1
 	json_close_object
 	ubus call network add_dynamic "$(json_dump)"
 
-- 
GitLab