On Fri, 21 Oct 2016 23:01:15 +0300
Shmulik Ladkani <shmulik.ladk...@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.ladk...@gmail.com>

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

Please cleanup and resubmit.

Reply via email to