summaryrefslogtreecommitdiff
path: root/src/network/networkd-netdev-bridge.c
diff options
context:
space:
mode:
authorSusant Sahani <ssahani@users.noreply.github.com>2016-05-15 18:45:20 +0530
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-05-15 09:15:20 -0400
commit6df6d89879b1fc390196b5638804e2c11fed9024 (patch)
tree501aeda99f4801c9d9ac74a614d3fd163a992547 /src/network/networkd-netdev-bridge.c
parent17fd746098bb451f4e9a1485374540eeafd11fda (diff)
networkd: bridge add support to configure multicast snooping (#3223)
This patch implements support for the IFLA_BR_MCAST_SNOOPING attribute it can change the multicast snooping value. IGMP snooping monitors the Internet Group Management Protocol (IGMP) traffic between hosts and multicast routers.
Diffstat (limited to 'src/network/networkd-netdev-bridge.c')
-rw-r--r--src/network/networkd-netdev-bridge.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/network/networkd-netdev-bridge.c b/src/network/networkd-netdev-bridge.c
index 3e44dd7960..4cfd00413f 100644
--- a/src/network/networkd-netdev-bridge.c
+++ b/src/network/networkd-netdev-bridge.c
@@ -96,6 +96,12 @@ static int netdev_bridge_post_create(NetDev *netdev, Link *link, sd_netlink_mess
return log_netdev_error_errno(netdev, r, "Could not append IFLA_BR_MCAST_QUERIER attribute: %m");
}
+ if (b->mcast_snooping >= 0) {
+ r = sd_netlink_message_append_u8(req, IFLA_BR_MCAST_SNOOPING, b->mcast_snooping);
+ if (r < 0)
+ return log_netdev_error_errno(netdev, r, "Could not append IFLA_BR_MCAST_SNOOPING attribute: %m");
+ }
+
r = sd_netlink_message_close_container(req);
if (r < 0)
return log_netdev_error_errno(netdev, r, "Could not append IFLA_LINKINFO attribute: %m");
@@ -121,6 +127,7 @@ static void bridge_init(NetDev *n) {
assert(b);
b->mcast_querier = -1;
+ b->mcast_snooping = -1;
}
const NetDevVTable bridge_vtable = {