mbox series

[net-next,0/4] net: Add support for dumping addresses for a specific device

Message ID 20181019194530.3590-1-dsahern@kernel.org
Headers show
Series net: Add support for dumping addresses for a specific device | expand

Message

David Ahern Oct. 19, 2018, 7:45 p.m. UTC
From: David Ahern <dsahern@gmail.com>

Use the recently added kernel side filter infrastructure to add support
for dumping addresses only for a specific device.

Patch 1 creates an IPv4 version similar to IPv6's in6_dump_addrs function.

Patch 2 simplifies in6_dump_addrs by moving index tracking of IP
addresses from inet6_dump_addr to in6_dump_addrs.

Patches 3 and 4 use the device-based address dump helpers to limit a
dump to just the addresses on a specific device.

David Ahern (4):
  net/ipv4: Move loop over addresses in dumps into in_dev_dump_addr
  net/ipv6: Remove ip_idx arg to in6_dump_addrs
  net/ipv4: Add support for dumping addresses for a specific device
  net/ipv6: Add support for dumping addresses for a specific device

 net/ipv4/devinet.c  | 77 +++++++++++++++++++++++++++++++++++++++--------------
 net/ipv6/addrconf.c | 43 +++++++++++++++++++-----------
 2 files changed, 85 insertions(+), 35 deletions(-)

Comments

David Miller Oct. 23, 2018, 2:33 a.m. UTC | #1
From: David Ahern <dsahern@kernel.org>
Date: Fri, 19 Oct 2018 12:45:26 -0700

> From: David Ahern <dsahern@gmail.com>
> 
> Use the recently added kernel side filter infrastructure to add support
> for dumping addresses only for a specific device.
> 
> Patch 1 creates an IPv4 version similar to IPv6's in6_dump_addrs function.
> 
> Patch 2 simplifies in6_dump_addrs by moving index tracking of IP
> addresses from inet6_dump_addr to in6_dump_addrs.
> 
> Patches 3 and 4 use the device-based address dump helpers to limit a
> dump to just the addresses on a specific device.

Create good infrastructure, and it will get used.

Series applied, thanks David.