diff options
author | Tobias Jungel <Tobias.Jungel@gmail.com> | 2016-08-31 20:06:23 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-08-31 20:06:23 +0200 |
commit | c7440e7401461a4bc668f5dae5b1861ed26b85dd (patch) | |
tree | 0010fc972a68248535c280a6ab3ff3c290fc1e6d /src/network/networkd-netdev-bridge.c | |
parent | 83bf26ed022ad79e977cd5374e2922cab7b315bb (diff) |
networkd: add options to bridge (#4051)
This patch allows to configure AgeingTimeSec, Priority and DefaultPVID for
bridge interfaces.
Diffstat (limited to 'src/network/networkd-netdev-bridge.c')
-rw-r--r-- | src/network/networkd-netdev-bridge.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/network/networkd-netdev-bridge.c b/src/network/networkd-netdev-bridge.c index 12b0fe972f..bdbea7d770 100644 --- a/src/network/networkd-netdev-bridge.c +++ b/src/network/networkd-netdev-bridge.c @@ -90,6 +90,24 @@ 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_MAX_AGE attribute: %m"); } + if (b->ageing_time > 0) { + r = sd_netlink_message_append_u32(req, IFLA_BR_AGEING_TIME, usec_to_jiffies(b->ageing_time)); + if (r < 0) + return log_netdev_error_errno(netdev, r, "Could not append IFLA_BR_AGEING_TIME attribute: %m"); + } + + if (b->priority > 0) { + r = sd_netlink_message_append_u16(req, IFLA_BR_PRIORITY, b->priority); + if (r < 0) + return log_netdev_error_errno(netdev, r, "Could not append IFLA_BR_PRIORITY attribute: %m"); + } + + if (b->default_pvid > 0) { + r = sd_netlink_message_append_u16(req, IFLA_BR_VLAN_DEFAULT_PVID, b->default_pvid); + if (r < 0) + return log_netdev_error_errno(netdev, r, "Could not append IFLA_BR_VLAN_DEFAULT_PVID attribute: %m"); + } + if (b->mcast_querier >= 0) { r = sd_netlink_message_append_u8(req, IFLA_BR_MCAST_QUERIER, b->mcast_querier); if (r < 0) |