[OpenWrt-Devel] [PATCH][netifd] bridge: fix the IPv6 configuration for an interface during reload
Hrvoje Varga
hrvoje.varga at sartura.hr
Fri Oct 14 06:18:26 EDT 2016
It has been observed that for a specific network configuration, netifd
was not able to set the IPv6 to an interface during the reload
procedure. The only option, before this fix, is to use the restart
procedure which is not acceptible.
This fix disables configuring the IPv6 for a bridge member when it is
added to a bridge and enables IPv6 configuration when a member is
removed from a bridge.
Signed-off-by: Hrvoje Varga <hrvoje.varga at sartura.hr>
---
system-linux.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/system-linux.c b/system-linux.c
index 6e4a194..ebb01d6 100644
--- a/system-linux.c
+++ b/system-linux.c
@@ -673,6 +673,9 @@ int system_bridge_addif(struct device *bridge, struct device *dev)
char *oldbr;
int ret = 0;
+ // Disable setting the IPv6 for an iterface which will be added
+ // to a bridge.
+ system_set_disable_ipv6(dev, "1");
oldbr = system_get_bridge(dev->ifname, dev_buf, sizeof(dev_buf));
if (!oldbr || strcmp(oldbr, bridge->ifname) != 0)
ret = system_bridge_if(bridge->ifname, dev, SIOCBRADDIF, NULL);
@@ -702,6 +705,9 @@ int system_bridge_addif(struct device *bridge, struct device *dev)
int system_bridge_delif(struct device *bridge, struct device *dev)
{
+ // Enable setting the IPv6 for an iterface which will be removed
+ // from a bridge.
+ system_set_disable_ipv6(dev, "0");
return system_bridge_if(bridge->ifname, dev, SIOCBRDELIF, NULL);
}
--
2.10.0
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list