summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Yan <tom.ty89@gmail.com>2016-05-28 13:35:01 +0800
committerTom Yan <tom.ty89@gmail.com>2016-05-28 13:35:01 +0800
commit2b00a4e03dc375465de7f60f3a6937cbe8ffdf31 (patch)
tree72795eaa753ebe5855c7fb52aa4394875021b791
parent2b2d8603ce5b9cbe797745ab6339f6f5e0dfb4ad (diff)
networkd: disable IPv6 for bridge slave
If an interface is managed as a bridge slave, we don't want any IP configuration for it. Therefore, disable IPv6 in such case.
-rw-r--r--src/network/networkd-link.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index 377e6f52f4..0d9d228796 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -110,6 +110,9 @@ static bool link_ipv6_enabled(Link *link) {
if (!socket_ipv6_is_supported())
return false;
+ if (link->network->bridge)
+ return false;
+
/* DHCPv6 client will not be started if no IPv6 link-local address is configured. */
return link_ipv6ll_enabled(link) || network_has_static_ipv6_addresses(link->network);
}
@@ -1586,7 +1589,7 @@ static int link_up(Link *link) {
}
/* If IPv6 not configured (no static IPv6 address and IPv6LL autoconfiguration is disabled)
- for this interface then disable IPv6 else enable it. */
+ for this interface, or if it is a bridge slave, then disable IPv6 else enable it. */
(void) link_enable_ipv6(link);
if (link->network->mtu) {