netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: David Ahern <dsa@cumulusnetworks.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH iproute2] ss: Fix support for device filter by index
Date: Wed, 20 Jul 2016 11:58:46 -0700	[thread overview]
Message-ID: <20160720115846.2e194813@xeon-e3> (raw)
In-Reply-To: <1468622495-24968-1-git-send-email-dsa@cumulusnetworks.com>

On Fri, 15 Jul 2016 15:41:35 -0700
David Ahern <dsa@cumulusnetworks.com> wrote:

> Support was recently added for device filters. The intent was to allow
> the device to be specified by name or index, and using the if%u format
> (dev == if5) or the simpler and more intuitive index alone (dev == 5).
> The latter case is broken since the index is not saved to the filter
> after the strtoul conversion. Further, the tmp variable used for the
> conversion shadows another variable used in the function. Fix both.
> 
> With this change all 3 variants work as expected:
> $ ss -t 'dev == 62'
> State   Recv-Q Send-Q         Local Address:Port    Peer Address:Port
> ESTAB       0      224         10.0.1.3%mgmt:ssh   192.168.0.50:58442
> 
> $ ss -t 'dev == mgmt'
> State   Recv-Q Send-Q         Local Address:Port    Peer Address:Port
> ESTAB       0      224         10.0.1.3%mgmt:ssh   192.168.0.50:58442
> 
> $ ss -t 'dev == if62'
> State   Recv-Q Send-Q         Local Address:Port    Peer Address:Port
> ESTAB       0      36          10.0.1.3%mgmt:ssh   192.168.0.50:58442
> 
> Fixes: 2d2932125616 ("ss: Add support to filter on device")
> Signed-off-by: David Ahern <dsa@cumulusnetworks.com>

Both applied

  reply	other threads:[~2016-07-20 19:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-15 22:41 [PATCH iproute2] ss: Fix support for device filter by index David Ahern
2016-07-20 18:58 ` Stephen Hemminger [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-07-15 16:29 David Ahern
2016-07-15 18:53 ` Stephen Hemminger
2016-07-15 18:56   ` David Ahern

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=20160720115846.2e194813@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=dsa@cumulusnetworks.com \
    --cc=netdev@vger.kernel.org \
    /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).