[PATCH] netifd: bridge: set default value for igmp_snoop

sotux82 at gmail.com sotux82 at gmail.com
Tue Feb 23 19:49:40 EST 2021


From: Zheng Qian <sotux82 at gmail.com>

When luci unchecked the igmp snoop option for a bridge, it
just delete the igmp_snooping key from the config file.
So netifd can't change /sys/devices/virtual/net/br-lan/bridge/multicast_snooping from "1" to "0".

This patch will set a default value to false for the bridge
option to fix this bug.

Signed-off-by: Zheng Qian <sotux82 at gmail.com>
---
 bridge.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/bridge.c b/bridge.c
index b70d626..464629c 100644
--- a/bridge.c
+++ b/bridge.c
@@ -875,6 +875,7 @@ bridge_apply_settings(struct bridge_state *bst, struct blob_attr **tb)
 
 	/* defaults */
 	cfg->stp = false;
+	cfg->igmp_snoop = false;
 	cfg->forward_delay = 2;
 	cfg->robustness = 2;
 	cfg->query_interval = 12500;
-- 
2.25.1




More information about the openwrt-devel mailing list