OSDN Git Service

ipmr, ip6mr: Unite dumproute flows
authorYuval Mintz <yuvalm@mellanox.com>
Wed, 28 Feb 2018 21:29:39 +0000 (23:29 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 1 Mar 2018 18:13:23 +0000 (13:13 -0500)
commit7b0db85737db3f4d76b2a412e4f19eae59b8b494
tree9cde582f7276b75ffb8ea39e0c1b8cd07218a85b
parent889cd83cbe411dda854429f3223ab2d31a860a4a
ipmr, ip6mr: Unite dumproute flows

The various MFC entries are being held in the same kind of mr_tables
for both ipmr and ip6mr, and their traversal logic is identical.
Also, with the exception of the addresses [and other small tidbits]
the major bulk of the nla setting is identical.

Unite as much of the dumping as possible between the two.
Notice this requires creating an mr_table iterator for each, as the
for-each preprocessor macro can't be used by the common logic.

Signed-off-by: Yuval Mintz <yuvalm@mellanox.com>
Acked-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/mroute_base.h
net/ipv4/ipmr.c
net/ipv4/ipmr_base.c
net/ipv6/ip6mr.c