diff options
author | Nikolay Aleksandrov <nikolay@cumulusnetworks.com> | 2018-03-23 18:27:06 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-03-23 12:41:14 -0400 |
commit | 82792a070b168a9659c78e6a19efe5b6d1a7ce73 (patch) | |
tree | be0c2eac05f6fbaa7c2fae7c50d75de72df62f63 /net/bridge/br_if.c | |
parent | 452a26138a8355a8502d91317cab10419332ce58 (diff) |
net: bridge: fix direct access to bridge vlan_enabled and use helper
We need to use br_vlan_enabled() helper otherwise we'll break builds
without bridge vlans:
net/bridge//br_if.c: In function ‘br_mtu’:
net/bridge//br_if.c:458:8: error: ‘const struct net_bridge’ has no
member named ‘vlan_enabled’
if (br->vlan_enabled)
^
net/bridge//br_if.c:462:1: warning: control reaches end of non-void
function [-Wreturn-type]
}
^
scripts/Makefile.build:324: recipe for target 'net/bridge//br_if.o'
failed
Fixes: 419d14af9e07 ("bridge: Allow max MTU when multiple VLANs present")
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_if.c')
-rw-r--r-- | net/bridge/br_if.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c index 48dc4d2e2be3..87b2afd455c7 100644 --- a/net/bridge/br_if.c +++ b/net/bridge/br_if.c @@ -455,7 +455,7 @@ static int __br_mtu(const struct net_bridge *br, bool (compare_fn)(int, int)) int br_mtu(const struct net_bridge *br) { - if (br->vlan_enabled) + if (br_vlan_enabled(br->dev)) return __br_mtu(br, max_mtu); else return __br_mtu(br, min_mtu); |