From 3b0959bb87f9e2a32a30342bae222b930cf6cabb Mon Sep 17 00:00:00 2001 From: James Haggerty Date: Tue, 12 Mar 2024 00:05:25 +0000 Subject: [PATCH] netifd: (APP-2648, PR #206) only reconfigure switch if changes This avoids our ethernet link dropping on any network change. It's a quick and dirty patch so we have minimal code here. Approved-by: Arien Judge Approved-by: Evan Benn --- package/network/config/netifd/files/etc/init.d/network | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/package/network/config/netifd/files/etc/init.d/network b/package/network/config/netifd/files/etc/init.d/network index dc208c4ce0..14347cdd06 100755 --- a/package/network/config/netifd/files/etc/init.d/network +++ b/package/network/config/netifd/files/etc/init.d/network @@ -10,6 +10,7 @@ init_switch() { include /lib/network setup_switch + uci show network | grep '^network.@switch' > /var/swconfig.current } start_service() { @@ -28,7 +29,9 @@ start_service() { reload_service() { local rv=0 - init_switch + if ! uci show network | grep '^network.@switch' | cmp -s /var/swconfig.current; then + init_switch + fi ubus call network reload || rv=1 /sbin/wifi reload_legacy return $rv