diff options
author | b1tninja <b1tninja@users.noreply.github.com> | 2017-09-08 12:36:06 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2017-09-08 12:36:06 +0200 |
commit | c4819961b1230c0c3a9e5b1964d1127689e9440d (patch) | |
tree | df5291493c6e8aeb905e436b9492d9ec1acd8972 /src/network/netdev | |
parent | Merge pull request #6770 from lucaswerkmeister/analyze-get-log (diff) | |
download | systemd-c4819961b1230c0c3a9e5b1964d1127689e9440d.tar.xz systemd-c4819961b1230c0c3a9e5b1964d1127689e9440d.zip |
Allow configuration of a bridge netdev's group_fwd_mask. (#6759)
Diffstat (limited to 'src/network/netdev')
-rw-r--r-- | src/network/netdev/bridge.c | 6 | ||||
-rw-r--r-- | src/network/netdev/bridge.h | 1 | ||||
-rw-r--r-- | src/network/netdev/netdev-gperf.gperf | 1 |
3 files changed, 8 insertions, 0 deletions
diff --git a/src/network/netdev/bridge.c b/src/network/netdev/bridge.c index cf6c591f8b..16fff78bf8 100644 --- a/src/network/netdev/bridge.c +++ b/src/network/netdev/bridge.c @@ -103,6 +103,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_PRIORITY attribute: %m"); } + if (b->group_fwd_mask > 0) { + r = sd_netlink_message_append_u16(req, IFLA_BR_GROUP_FWD_MASK, b->group_fwd_mask); + if (r < 0) + return log_netdev_error_errno(netdev, r, "Could not append IFLA_BR_GROUP_FWD_MASK attribute: %m"); + } + if (b->default_pvid != VLANID_INVALID) { r = sd_netlink_message_append_u16(req, IFLA_BR_VLAN_DEFAULT_PVID, b->default_pvid); if (r < 0) diff --git a/src/network/netdev/bridge.h b/src/network/netdev/bridge.h index 093c60d5b5..b303cfd3f3 100644 --- a/src/network/netdev/bridge.h +++ b/src/network/netdev/bridge.h @@ -29,6 +29,7 @@ typedef struct Bridge { int vlan_filtering; int stp; uint16_t priority; + uint16_t group_fwd_mask; uint16_t default_pvid; usec_t forward_delay; diff --git a/src/network/netdev/netdev-gperf.gperf b/src/network/netdev/netdev-gperf.gperf index 230dc1b885..002efd7e9c 100644 --- a/src/network/netdev/netdev-gperf.gperf +++ b/src/network/netdev/netdev-gperf.gperf @@ -129,6 +129,7 @@ Bridge.MaxAgeSec, config_parse_sec, 0, Bridge.AgeingTimeSec, config_parse_sec, 0, offsetof(Bridge, ageing_time) Bridge.ForwardDelaySec, config_parse_sec, 0, offsetof(Bridge, forward_delay) Bridge.Priority, config_parse_uint16, 0, offsetof(Bridge, priority) +Bridge.GroupForwardMask, config_parse_uint16, 0, offsetof(Bridge, group_fwd_mask) Bridge.DefaultPVID, config_parse_default_port_vlanid, 0, offsetof(Bridge, default_pvid) Bridge.MulticastQuerier, config_parse_tristate, 0, offsetof(Bridge, mcast_querier) Bridge.MulticastSnooping, config_parse_tristate, 0, offsetof(Bridge, mcast_snooping) |