Skip to content

Commit

Permalink
net: bridge: fix direct access to bridge vlan_enabled and use helper
Browse files Browse the repository at this point in the history
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: 419d14a ("bridge: Allow max MTU when multiple VLANs present")
Signed-off-by: Nikolay Aleksandrov <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Nikolay Aleksandrov authored and davem330 committed Mar 23, 2018
1 parent 452a261 commit 82792a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/bridge/br_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 82792a0

Please sign in to comment.