Skip to content

Generalize the inet_diag infrastructure

Pavel Emelyanov netdev 1 version Applied

Status from this message: Applied, with the retention of a NETLINK_INET_DIAG define in patch #1 for

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest11 patches 3 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/11inet_diag: Partly rename inet_ to sock_include/linux/netlink.h net/dccp/diag.c net/ipv4/inet_diag.c +2 more+23 -182 replies
2/11sock_diag: Introduce new message typeinclude/linux/inet_diag.h net/ipv4/inet_diag.c+16 -20 replies
3/11inet_diag: Move byte-code finding up the call-stacknet/ipv4/inet_diag.c+17 -190 replies
4/11inet_diag: Switch from _GETSOCK to IPPROTO_ numbersnet/dccp/diag.c net/ipv4/inet_diag.c net/ipv4/tcp_diag.c+27 -150 replies
5/11sock_diag: Initial skeletoninclude/linux/sock_diag.h net/ipv4/inet_diag.c+123 -20 replies
6/11inet_diag: Introduce new inet_diag_req headerinclude/linux/inet_diag.h net/ipv4/inet_diag.c+17 -80 replies
7/11inet_diag: Switch the _get_exact to work with new headernet/ipv4/inet_diag.c+22 -70 replies
8/11inet_diag: Switch the _dump to work with new headernet/ipv4/inet_diag.c+53 -180 replies
9/11inet_diag: Introduce socket family checksnet/ipv4/inet_diag.c+11 -10 replies
10/11inet_diag: Cleanup type2proto last usernet/ipv4/inet_diag.c+24 -230 replies
11/11sock_diag: Move the sock_ code to net/core/net/core/Makefile net/core/sock_diag.c net/ipv4/inet_diag.c+158 -1000 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/11] Generalize the inet_diag infrastructure

This is an attempt to prepare the existing inet_diag infrastructure to work with arbitrary address family and protocol pair, not only AF_INET(6) and TCP/DCCP.

This set adds the sock_diag infrastructure, that handles the new SOCK_DIAG_BY_FAMILY message type by the NETLINK_INET_DIAG socket. The core API struct for this (called sock_diag_req) contains two fields - family and type - which specify which sockets to dump. Additional information is considered to be family handler specific.

The existing inet_diag code is patched to register himself inside the sock_diag and provide callbacks for dumping AF_INET/AF_INET6 IPPROTO_TCP/IPPROTO_DCCP sockets. The existing API facilities such as state filtering and bytecode is of course preserved and is treated by inet_diag specific data.

Binary compatibility with existing NETLINK_INET_DIAG is also kept.

No additional stuff in this set. The support for IPPROTO_UDP protocol and AF_UNIX family will come later if this set is approved.

Applies to net-next, patch for iproute2's ss tool (proving that the new code ... pretends to work) is at the end of the thread.