mirror of
https://git.proxmox.com/git/mirror_iproute2
synced 2026-01-08 19:47:40 +00:00
ss: Get udp sockets info via sock-diag
Now everything is prepared for it, so the patch is straightforward. Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
886d19d6c9
commit
346f8ca814
@ -1508,6 +1508,9 @@ static int tcpdiag_send(int fd, int protocol, struct filter *f)
|
||||
struct rtattr rta;
|
||||
struct iovec iov[3];
|
||||
|
||||
if (protocol == IPPROTO_UDP)
|
||||
return -1;
|
||||
|
||||
memset(&nladdr, 0, sizeof(nladdr));
|
||||
nladdr.nl_family = AF_NETLINK;
|
||||
|
||||
@ -1976,6 +1979,10 @@ int udp_show(struct filter *f)
|
||||
{
|
||||
FILE *fp = NULL;
|
||||
|
||||
if (!getenv("PROC_NET_UDP") && !getenv("PROC_ROOT")
|
||||
&& inet_show_netlink(f, NULL, IPPROTO_UDP) == 0)
|
||||
return 0;
|
||||
|
||||
dg_proto = UDP_PROTO;
|
||||
|
||||
if (f->families&(1<<AF_INET)) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user