inet: allow ip_valid_fib_dump_req() to be called with RTNL or RCU

Add a new field into struct fib_dump_filter, to let callers
tell if they use RTNL locking or RCU.

This is used in the following patch, when inet_dump_fib()
no longer holds RTNL.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Eric Dumazet
2024-02-22 10:50:17 +00:00
committed by David S. Miller
parent 69fdb7e411
commit 22e36ea9f5
6 changed files with 26 additions and 9 deletions

View File

@ -264,6 +264,7 @@ struct fib_dump_filter {
bool filter_set;
bool dump_routes;
bool dump_exceptions;
bool rtnl_held;
unsigned char protocol;
unsigned char rt_type;
unsigned int flags;