Re: src: add redirect support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12 December 2014 at 16:29, Patrick McHardy <kaber@xxxxxxxxx> wrote:
> Looking at the redir bug report on netfilter-devel, I noticed some
> odd syntax for the redir statement.
>
> The changelog states:
>
>   The syntax is:
>
>   % nft add rule nat prerouting redirect [port] [nat_flags]
>
> The actual syntax though is:
>
> redir_stmt_arg          :       COLON   expr
>
> What do we need that colon for? redirect by definition redirects to
> the local host, the argument is always only a port expression.

Yes, there is a inconsistency between the commit message and the code. My fault.

I don't exactly remember where that syntax came from. I guess the
colon was used in consistency with other nat-like expressions.
Actually, I don't have a particular preference (the colon or not).

Do you want me to change the syntax? I can do it this weekend. Just
let me know :-)

If you are going to change it yourself, I would suggest to also update
regression tests [0], which BTW seems broken due to the
random-fully/fully-random change.

best regards.

[0] http://git.netfilter.org/nftables/tree/tests/regression/ip/redirect.t
-- 
Arturo Borrero González
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux