Re: [PATCH 1/3] scanner: replace binary characters '&' '|' and '!' by their names

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

 



On Tue, Jan 14, 2014 at 12:30:28PM +0100, Pablo Neira Ayuso wrote:
> These symbol need to be escaped in bash and can lead to confusion,
> so let's use their names instead which are still short, eg.
> 
>  nft add rule filter output meta mark and 0x3 == 0x1

Seems fine to me, although I'd rather have both ways of specifying them.

> Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>
> ---
>  src/scanner.l |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/src/scanner.l b/src/scanner.l
> index cee6aa6..2d7ac88 100644
> --- a/src/scanner.l
> +++ b/src/scanner.l
> @@ -200,9 +200,9 @@ addrstring	({macaddr}|{ip4addr}|{ip6addr})
>  "<<"			{ return LSHIFT; }
>  ">>"			{ return RSHIFT; }
>  "^"			{ return CARET; }
> -"&"			{ return AMPERSAND; }
> -"|"			{ return '|'; }
> -"!"			{ return NOT; }
> +"and"			{ return AMPERSAND; }
> +"or"			{ return '|'; }
> +"not"			{ return NOT; }
>  "/"			{ return SLASH; }
>  "-"			{ return DASH; }
>  "*"			{ return ASTERISK; }
> -- 
> 1.7.10.4
--
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