]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Jun 2019 10:19:13 +0000 (12:19 +0200)
commitad491eac759043244471e748081adcbf63d299f4
tree6399bda572d640b1dcf5dfd8ab7954c247055e66
parentcb6794b72c9dbc010f0933d543be2c2e993b3cfe
ipmr_base: Do not reset index in mr_table_dump

[ Upstream commit 7fcd1e033dacedd520abebc943c960dcf5add3ae ]

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: e1cedae1ba6b0 ("ipmr: Refactor mr_rtm_dumproute")
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv4/ipmr_base.c