Skip to contentSkip to conversation

net: bridge: vlan: fix global vlan option range dumping

PATCH Applied Nikolay Aleksandrov 2 participants 2 messages Aug 10, 2021 – Aug 11, 2021

Subsystems (3)
lore
Share & tools
lore

Nikolay Aleksandrov

author maintainer
#0 lore raw

PATCH 1/1 net: bridge: vlan: fix global vlan option range dumping

From: Nikolay Aleksandrov <[email protected]>

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 743a53d9636a ("net: bridge: vlan: add support for dumping global vlan options")
---
 net/bridge/br_vlan.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
net/bridge/br_vlan.c +2 -1
index 8cfd035bbaf9..cbc922681a76 100644
@@ -2019,7 +2019,7 @@ static int br_vlan_dump_dev(const struct net_device *dev,
 
 		if (dump_global) {
 			if (br_vlan_global_opts_can_enter_range(v, range_end))
-				continue;
+				goto update_end;
 			if (!br_vlan_global_opts_fill(skb, range_start->vid,
 						      range_end->vid,
 						      range_start)) {
@@ -2045,6 +2045,7 @@ static int br_vlan_dump_dev(const struct net_device *dev,
 
 			range_start = v;
 		}
+update_end:
 		range_end = v;
 	}
 
Signature · 1 line
2.31.1
#1 lore raw
This patch was applied to netdev/net-next.git (refs/heads/master):

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

Quoted 8 lines · On Tue, 10 Aug 2021 12:21:39 +0300 you wrote:

From: Nikolay Aleksandrov <[email protected]>

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.

[...]

Here is the summary with links:
- [net-next] net: bridge: vlan: fix global vlan option range dumping

    https://git.kernel.org/netdev/net-next/c/6c4110d9f499

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html