From: Nikolay Aleksandrov Date: Tue, 10 Aug 2021 09:21:39 +0000 (+0300) Subject: net: bridge: vlan: fix global vlan option range dumping X-Git-Tag: accepted/tizen/unified/20230118.172025~6527^2~232 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6c4110d9f499e2170fbb36723b0a5f50a8116304;p=platform%2Fkernel%2Flinux-rpi.git 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: 743a53d9636a ("net: bridge: vlan: add support for dumping global vlan options") Signed-off-by: Nikolay Aleksandrov Link: https://lore.kernel.org/r/20210810092139.11700-1-razor@blackwall.org Signed-off-by: Jakub Kicinski --- diff --git a/net/bridge/br_vlan.c b/net/bridge/br_vlan.c index 8cfd035..cbc9226 100644 --- a/net/bridge/br_vlan.c +++ b/net/bridge/br_vlan.c @@ -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; }