netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>, netdev@vger.kernel.org
Subject: Re: [PATCH iproute2 net-next] tc: m_mirred: Fix parsing of 'index' optional argument
Date: Wed, 26 Oct 2016 11:23:02 -0700	[thread overview]
Message-ID: <20161026112302.7d7fecd0@xeon-e3> (raw)
In-Reply-To: <1477080075-17146-1-git-send-email-shmulik.ladkani@gmail.com>

On Fri, 21 Oct 2016 23:01:15 +0300
Shmulik Ladkani <shmulik.ladkani@gmail.com> wrote:

> Code in parse_mirred() suggests "index" argument can be placed either
> after the "egress" clause, or as the first argument (after "action mirred").
> 
> However, parse_egress() fails to correctly parse "index" if it's the
> first argument.
> 
> For example:
> 
>  # tc filter add ... action mirred index 5
>  RTNETLINK answers: Invalid argument
>  (unnecessary RTNETLINK issued, should have been parse error)
> 
>  # tc filter add ... action mirred index 5 egress redirect dev eth0
>  bad action type egress
>  (should have been parsed successfully)
> 
> Fix parse_egress as follows:
>  - continue parsing after valid "index" is seen
>  - don't issue the RTNETLINK unless valid "egress" is seen
> 
> Signed-off-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>

Looks like a good fix but does not apply cleanly to current net-next branch.

Please cleanup and resubmit.

      reply	other threads:[~2016-10-26 18:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-21 20:01 [PATCH iproute2 net-next] tc: m_mirred: Fix parsing of 'index' optional argument Shmulik Ladkani
2016-10-26 18:23 ` Stephen Hemminger [this message]

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=20161026112302.7d7fecd0@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=jhs@mojatatu.com \
    --cc=netdev@vger.kernel.org \
    --cc=shmulik.ladkani@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).