Skip to content

Commit 82792a0

Browse files
Nikolay Aleksandrovdavem330
authored andcommitted
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: 419d14a ("bridge: Allow max MTU when multiple VLANs present") Signed-off-by: Nikolay Aleksandrov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 452a261 commit 82792a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/bridge/br_if.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ static int __br_mtu(const struct net_bridge *br, bool (compare_fn)(int, int))
455455

456456
int br_mtu(const struct net_bridge *br)
457457
{
458-
if (br->vlan_enabled)
458+
if (br_vlan_enabled(br->dev))
459459
return __br_mtu(br, max_mtu);
460460
else
461461
return __br_mtu(br, min_mtu);

0 commit comments

Comments
 (0)