[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <713e95b3-8a90-1ef5-70af-dcc5426b2884@cumulusnetworks.com>
Date: Sat, 19 Nov 2016 21:45:38 -0500
From: David Ahern <dsa@...ulusnetworks.com>
To: Zhang Shengju <zhangshengju@...s.chinamobile.com>,
netdev@...r.kernel.org
Subject: Re: [net-next] rtnl: fix the loop index update error in
rtnl_dump_ifinfo()
On 11/19/16 10:28 AM, Zhang Shengju wrote:
> If the link is filtered out, loop index should also be updated. If not,
> loop index will not be correct.
>
> Signed-off-by: Zhang Shengju <zhangshengju@...s.chinamobile.com>
> ---
> net/core/rtnetlink.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
> index db313ec..f4b9350 100644
> --- a/net/core/rtnetlink.c
> +++ b/net/core/rtnetlink.c
> @@ -1606,7 +1606,7 @@ static int rtnl_dump_ifinfo(struct sk_buff *skb, struct netlink_callback *cb)
> head = &net->dev_index_head[h];
> hlist_for_each_entry(dev, head, index_hlist) {
> if (link_dump_filtered(dev, master_idx, kind_ops))
> - continue;
> + goto cont;
> if (idx < s_idx)
> goto cont;
> err = rtnl_fill_ifinfo(skb, dev, RTM_NEWLINK,
>
Fixes: dc599f76c22b0 ("net: Add support for filtering link dump by master device and kind")
Acked-by: David Ahern <dsa@...ulusnetworks.com>
Powered by blists - more mailing lists