]> git.baikalelectronics.ru Git - kernel.git/commit
sock_diag: implement a get_info handler for inet
authorCraig Gallek <kraig@google.com>
Mon, 15 Jun 2015 15:26:20 +0000 (11:26 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 16 Jun 2015 02:49:22 +0000 (19:49 -0700)
commit09c7072dd41845fde8cd67e82535470b844d31f6
tree19ed0663ecfc90d53e8a449f28b25206e0c9a5f6
parent3100874f873b375d2e752b723acde789368b34bb
sock_diag: implement a get_info handler for inet

This get_info handler will simply dispatch to the appropriate
existing inet protocol handler.

This patch also includes a new netlink attribute
(INET_DIAG_PROTOCOL).  This attribute is currently only used
for multicast messages.  Without this attribute, there is no
way of knowing the IP protocol used by the socket information
being broadcast.  This attribute is not necessary in the 'dump'
variant of this protocol (though it could easily be added)
because dump requests are issued for specific family/protocol
pairs.

Tested: ss -E (note, the -E option has not yet been merged into
the upstream version of ss).

Signed-off-by: Craig Gallek <kraig@google.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/uapi/linux/inet_diag.h
net/ipv4/inet_diag.c
net/ipv4/tcp.c
net/ipv4/tcp_diag.c