netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Vadim Kochan <vadim4j@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH iproute2] ss: Filter inet dgram sockets with established state by default
Date: Tue, 13 Jan 2015 17:31:50 -0800	[thread overview]
Message-ID: <20150113173150.0a50f74e@urahara> (raw)
In-Reply-To: <1420738342-3750-1-git-send-email-vadim4j@gmail.com>

On Thu,  8 Jan 2015 19:32:22 +0200
Vadim Kochan <vadim4j@gmail.com> wrote:

> From: Vadim Kochan <vadim4j@gmail.com>
> 
> As inet dgram sockets (udp, raw) can call connect(...)  - they
> might be set in ESTABLISHED state. So keep the original behaviour of
> 'ss' which filtered them by ESTABLISHED state by default. So:
> 
>     $ ss -u
> 
>     or
> 
>     $ ss -w
> 
> Will show only ESTABLISHED UDP sockets by default.
> 
> Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
> ---
>  misc/ss.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/misc/ss.c b/misc/ss.c
> index 08d210a..015d829 100644
> --- a/misc/ss.c
> +++ b/misc/ss.c
> @@ -170,11 +170,11 @@ static const struct filter default_dbs[MAX_DB] = {
>  		.families = (1 << AF_INET) | (1 << AF_INET6),
>  	},
>  	[UDP_DB] = {
> -		.states   = (1 << SS_CLOSE),
> +		.states   = (1 << SS_ESTABLISHED),
>  		.families = (1 << AF_INET) | (1 << AF_INET6),
>  	},
>  	[RAW_DB] = {
> -		.states   = (1 << SS_CLOSE),
> +		.states   = (1 << SS_ESTABLISHED),
>  		.families = (1 << AF_INET) | (1 << AF_INET6),
>  	},
>  	[UNIX_DG_DB] = {

This is a change likely to break somebody using 'ss -u' now and the bound
sockets will disappear from the output.

  reply	other threads:[~2015-01-14  1:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-08 17:32 [PATCH iproute2] ss: Filter inet dgram sockets with established state by default Vadim Kochan
2015-01-14  1:31 ` Stephen Hemminger [this message]
2015-01-14  6:49   ` Vadim Kochan
2015-01-14 22:41     ` Stephen Hemminger
2015-01-14 22:43       ` Vadim Kochan
2015-01-15  2:48         ` Stephen Hemminger
2015-01-15  4:49           ` Vadim Kochan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150113173150.0a50f74e@urahara \
    --to=stephen@networkplumber.org \
    --cc=netdev@vger.kernel.org \
    --cc=vadim4j@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).