]> git.baikalelectronics.ru Git - kernel.git/commit
net: Fix continued iteration in rtnl_bridge_getlink()
authorBen Hutchings <bhutchings@solarflare.com>
Fri, 2 Nov 2012 12:56:52 +0000 (12:56 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 3 Nov 2012 01:53:35 +0000 (21:53 -0400)
commitc95f6b88d4f0d44161a3f3b6807f8c46c5003794
tree80049b1fc9689f357c9fdaaa22c35fab8d3159c2
parent4cf4a4b01cfa2f1f9895aa5c8256fa50003ec6f7
net: Fix continued iteration in rtnl_bridge_getlink()

Commit 8b123fd429584703d83580584143e1d141bff2bc ('net: create generic
bridge ops') broke the handling of a non-zero starting index in
rtnl_bridge_getlink() (based on the old br_dump_ifinfo()).

When the starting index is non-zero, we need to increment the current
index for each entry that we are skipping.  Also, we need to check the
index before both cases, since we may previously have stopped
iteration between getting information about a device from its master
and from itself.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Tested-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/rtnetlink.c