ipv6: use xa_array iterator to implement inet6_netconf_dump_devconf()
authorEric Dumazet <edumazet@google.com>
Wed, 28 Feb 2024 13:54:39 +0000 (13:54 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 1 Mar 2024 08:42:33 +0000 (08:42 +0000)
commit2a02f8379bde89472cddb49dc8e55a17e0b68eed
treeb790be03802a14ad4f106ce7c1f221990b468dd6
parent2f0ff05a44302c91af54a5f9efe1b65b7681540e
ipv6: use xa_array iterator to implement inet6_netconf_dump_devconf()

1) inet6_netconf_dump_devconf() can run under RCU protection
   instead of RTNL.

2) properly return 0 at the end of a dump, avoiding an
   an extra recvmsg() system call.

3) Do not use inet6_base_seq() anymore, for_each_netdev_dump()
   has nice properties. Restarting a GETDEVCONF dump if a device has
   been added/removed or if net->ipv6.dev_addr_genid has changed is moot.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/addrconf.c