From 27fe1ed4e28c31fdbc0c84366957ad4329324c03 Mon Sep 17 00:00:00 2001
From: Grische <github@grische.xyz>
Date: Tue, 9 Jul 2024 18:25:54 +0200
Subject: [PATCH] gluon-core: migrate lan role of single port config

when a device is migrated from a single WAN/LAN configuration to a
multi-port configuration (e.g. using DSA), set the same role on all
ports and not just the new WAN port.
---
 package/gluon-core/luasrc/lib/gluon/upgrade/021-interface-roles | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/gluon-core/luasrc/lib/gluon/upgrade/021-interface-roles b/package/gluon-core/luasrc/lib/gluon/upgrade/021-interface-roles
index 6bceb36e5..304034115 100755
--- a/package/gluon-core/luasrc/lib/gluon/upgrade/021-interface-roles
+++ b/package/gluon-core/luasrc/lib/gluon/upgrade/021-interface-roles
@@ -43,6 +43,7 @@ if uci:get('gluon', 'iface_wan') then
 end
 if uci:get('gluon', 'iface_single') then
 	roles.wan = uci:get_list('gluon', 'iface_single', 'role')
+	roles.lan = uci:get_list('gluon', 'iface_single', 'role')
 end
 
 -- Non-existing interfaces are nil, so they will not be added to the table
-- 
GitLab