]> git.proxmox.com Git - mirror_iproute2.git/commit
ss: do not emit warn while dumping MPTCP on old kernels
authorPaolo Abeni <pabeni@redhat.com>
Mon, 25 Jan 2021 16:02:07 +0000 (17:02 +0100)
committerStephen Hemminger <stephen@networkplumber.org>
Tue, 2 Feb 2021 22:17:14 +0000 (14:17 -0800)
commit3d6d9e6e67a8d0433c9bc3df6f80817d3473bdd4
treecee7c4a6798ff59fb5f0be0ffde6b5757a2be6e3
parent4712a4617408da5afabc9433c7316a99363fd053
ss: do not emit warn while dumping MPTCP on old kernels

Prior to this commit, running 'ss' on a kernel older than v5.9
bumps an error message:

RTNETLINK answers: Invalid argument

When asked to dump protocol number > 255 - that is: MPTCP - 'ss'
adds an INET_DIAG_REQ_PROTOCOL attribute, unsupported by the older
kernel.

Avoid the warning ignoring filter issues when INET_DIAG_REQ_PROTOCOL
is used.

Additionally older kernel end-up invoking tcpdiag_send(), which
in turn will try to dump DCCP socks. Bail early in such function,
as the kernel does not implement an MPTCPDIAG_GET request.

Reported-by: "Rantala, Tommi T. (Nokia - FI/Espoo)" <tommi.t.rantala@nokia.com>
Fixes: 9c3be2c0eee0 ("ss: mptcp: add msk diag interface support")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
misc/ss.c