mirror of
https://git.proxmox.com/git/mirror_iproute2
synced 2025-12-16 03:34:05 +00:00
ss: enable query by type in unix domain related socket
This patch enables -A unix_stream, -A unix_dgram and -A unix_seqpacket option even if ss gets socket information via netlink. Signed-off-by: Masatake YAMATO <yamato@redhat.com>
This commit is contained in:
parent
30b669d7ac
commit
0d2e01c5ee
@ -2205,6 +2205,13 @@ static int unix_show_sock(struct nlmsghdr *nlh, struct filter *f)
|
||||
parse_rtattr(tb, UNIX_DIAG_MAX, (struct rtattr*)(r+1),
|
||||
nlh->nlmsg_len - NLMSG_LENGTH(sizeof(*r)));
|
||||
|
||||
if (r->udiag_type == SOCK_STREAM && !(f->dbs&(1<<UNIX_ST_DB)))
|
||||
return 0;
|
||||
if (r->udiag_type == SOCK_DGRAM && !(f->dbs&(1<<UNIX_DG_DB)))
|
||||
return 0;
|
||||
if (r->udiag_type == SOCK_SEQPACKET && !(f->dbs&(1<<UNIX_SQ_DB)))
|
||||
return 0;
|
||||
|
||||
if (netid_width)
|
||||
printf("%-*s ", netid_width,
|
||||
unix_netid_name(r->udiag_type));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user