[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20170830082013.4b188a26@xeon-e3>
Date: Wed, 30 Aug 2017 08:20:13 -0700
From: Stephen Hemminger <stephen@...workplumber.org>
To: Phil Sutter <phil@....cc>
Cc: netdev@...r.kernel.org
Subject: Re: [iproute PATCH] ss: Fix for added diag support check
On Mon, 28 Aug 2017 19:31:22 +0200
Phil Sutter <phil@....cc> wrote:
> Commit 9f66764e308e9 ("libnetlink: Add test for error code returned from
> netlink reply") changed rtnl_dump_filter_l() to return an error in case
> NLMSG_DONE would contain one, even if it was ENOENT.
>
> This in turn breaks ss when it tries to dump DCCP sockets on a system
> without support for it: The function tcp_show(), which is shared between
> TCP and DCCP, will start parsing /proc since inet_show_netlink() returns
> an error - yet it parses /proc/net/tcp which doesn't make sense for DCCP
> sockets at all.
>
> On my system, a call to 'ss' without further arguments prints the list
> of connected TCP sockets twice.
>
> Fix this by introducing a dedicated function dccp_show() which does not
> have a fallback to /proc, just like sctp_show(). And since tcp_show()
> is no longer "multi-purpose", drop it's socktype parameter.
>
> Fixes: 9f66764e308e9 ("libnetlink: Add test for error code returned from netlink reply")
> Signed-off-by: Phil Sutter <phil@....cc>
Applied
Powered by blists - more mailing lists