]> git.baikalelectronics.ru Git - kernel.git/commit
ipmr_base: Do not reset index in mr_table_dump
authorDavid Ahern <dsahern@gmail.com>
Thu, 2 May 2019 22:14:15 +0000 (15:14 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 4 May 2019 05:38:15 +0000 (01:38 -0400)
commit8759a229603f517480a8ee545c440ca66af11137
treeec3bfdbecfae2dba28ba400d99de094bdf25db6a
parent6b7e67ed3ea1b447b1b2b378b9993cbea35c9cbb
ipmr_base: Do not reset index in mr_table_dump

e is the counter used to save the location of a dump when an
skb is filled. Once the walk of the table is complete, mr_table_dump
needs to return without resetting that index to 0. Dump of a specific
table is looping because of the reset because there is no way to
indicate the walk of the table is done.

Move the reset to the caller so the dump of each table starts at 0,
but the loop counter is maintained if a dump fills an skb.

Fixes: d6714870de39c ("ipmr: Refactor mr_rtm_dumproute")
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ipmr_base.c