DCCP support was retired in kernel commit 2a63dd0edf38 ("net: Retire DCCP socket."). However, ss still attempts to query DCCP sockets via netlink, which triggers repeated SELinux warnings in dmesg: SELinux: unrecognized netlink message: protocol=4 nlmsg_type=19 \ sclass=netlink_tcpdiag_socket pid=188945 comm=ss Stop sending DCCPDIAG_GETSOCK netlink messages to suppress these warnings and align ss with the kernel change. After this commit, running `ss -d` fails with: # ./misc/ss -d ./misc/ss: invalid option -- 'd' [...] # ./misc/ss --dccp ./misc/ss: unrecognized option '--dccp' [...] Signed-off-by: Yafang Shao Cc: Stephen Hemminger Cc: Kuniyuki Iwashima --- man/man8/ss.8 | 5 +---- misc/ss.c | 41 ++++++----------------------------------- 2 files changed, 7 insertions(+), 39 deletions(-) diff --git a/man/man8/ss.8 b/man/man8/ss.8 index 70e0a566..3871612d 100644 --- a/man/man8/ss.8 +++ b/man/man8/ss.8 @@ -377,9 +377,6 @@ Display TCP sockets. .B \-u, \-\-udp Display UDP sockets. .TP -.B \-d, \-\-dccp -Display DCCP sockets. -.TP .B \-w, \-\-raw Display RAW sockets. .TP @@ -411,7 +408,7 @@ supported: unix, inet, inet6, link, netlink, vsock, tipc, xdp. .B \-A QUERY, \-\-query=QUERY, \-\-socket=QUERY List of socket tables to dump, separated by commas. The following identifiers are understood: all, inet, tcp, udp, raw, unix, packet, netlink, unix_dgram, -unix_stream, unix_seqpacket, packet_raw, packet_dgram, dccp, sctp, tipc, +unix_stream, unix_seqpacket, packet_raw, packet_dgram, sctp, tipc, vsock_stream, vsock_dgram, xdp, mptcp. Any item in the list may optionally be prefixed by an exclamation mark .RB ( ! ) diff --git a/misc/ss.c b/misc/ss.c index 14e9f27a..b5f59a37 100644 --- a/misc/ss.c +++ b/misc/ss.c @@ -195,7 +195,6 @@ static const char *dg_proto; enum { TCP_DB, MPTCP_DB, - DCCP_DB, UDP_DB, RAW_DB, UNIX_DG_DB, @@ -215,7 +214,7 @@ enum { #define PACKET_DBM ((1<