[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKD1Yr1u-p8hyjd_e672kYrXw+-Mkmj_Cxai=WUYM-9QQG=DQg@mail.gmail.com>
Date: Thu, 19 May 2016 09:55:10 +0900
From: Lorenzo Colitti <lorenzo@...gle.com>
To: Subash Abhinov Kasiviswanathan <subashab@...eaurora.org>
Cc: David Ahern <dsa@...ulusnetworks.com>,
Stephen Hemminger <stephen@...workplumber.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
netdev-owner@...r.kernel.org, David Miller <davem@...emloft.net>,
Eric Dumazet <eric.dumazet@...il.com>,
Maciej Żenczykowski <zenczykowski@...il.com>,
Tom Herbert <tom@...bertland.com>
Subject: Re: [PATCH iproute2] ss: Tell user about -EOPNOTSUPP for SOCK_DESTROY
On Wed, May 18, 2016 at 3:35 AM, <subashab@...eaurora.org> wrote:
> Would it be acceptable to have a separate column which displays the result of the sock destroy operation per socket.
> State ... Killed
> ESTAB Y
> TIME_WAIT N
Fine by me, but... what problem are we trying to address? People who
compile their own kernels and don't turn CONFIG_INET_DIAG_DESTROY, and
then are confused why it doesn't work? Seems like we could fix that by
turning CONFIG_INET_DIAG_DESTROY on by default. CCing the people who
commented on the original SOCK_DESTROY patch to see if they have
opinions.
> If it is not supported from kernel, maybe print U (unsupported) for this.
In current code there is no way to distinguish U from N because in
both cases the error will be EOPNOTSUPP. It's certainly possible to
change SOCK_DESTROY to return something else (e.g., EBADFD) to
indicate "kernel supports closing this type of socket, but it can't be
closed due to the state it's in". In hindsight, perhaps I should have
done that from the start.
Regardless, we still have the problem of what to do if the user says
"ss -K dport = :443" and we encounter a UDP socket connected to port
443. Options:
1. Silently skip. if the tool prints something, it means it closed it.
2. Abort with an error message.
3. Skip the socket and print an error every time this happens.
4. Skip the socket and print an error the first time this happens.
Personally I still think #1 is the best option.
Powered by blists - more mailing lists