Skip to content

Commit 6c4110d

Browse files
Nikolay Aleksandrovkuba-moo
authored andcommitted
net: bridge: vlan: fix global vlan option range dumping
When global vlan options are equal sequentially we compress them in a range to save space and reduce processing time. In order to have the proper range end id we need to update range_end if the options are equal otherwise we get ranges with the same end vlan id as the start. Fixes: 743a53d ("net: bridge: vlan: add support for dumping global vlan options") Signed-off-by: Nikolay Aleksandrov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 83f0a0b commit 6c4110d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

net/bridge/br_vlan.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2019,7 +2019,7 @@ static int br_vlan_dump_dev(const struct net_device *dev,
20192019

20202020
if (dump_global) {
20212021
if (br_vlan_global_opts_can_enter_range(v, range_end))
2022-
continue;
2022+
goto update_end;
20232023
if (!br_vlan_global_opts_fill(skb, range_start->vid,
20242024
range_end->vid,
20252025
range_start)) {
@@ -2045,6 +2045,7 @@ static int br_vlan_dump_dev(const struct net_device *dev,
20452045

20462046
range_start = v;
20472047
}
2048+
update_end:
20482049
range_end = v;
20492050
}
20502051

0 commit comments

Comments
 (0)