Skip to content

syntax updates

Pablo Neira Ayuso netfilter-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest10 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10src: quote user-defined strings when used from rule selectorsinclude/datatype.h src/ct.c src/datatype.c +4 more+59 -550 replies
2/10src: add 'to' for snat and dnatsrc/parser_bison.y src/statement.c tests/py/ip/dnat.t +7 more+40 -400 replies
3/10src: support for RFC2732 IPv6 address format with bracketssrc/scanner.l src/statement.c tests/py/ip6/dnat.t +3 more+46 -100 replies
4/10parser_bison: missing token string in QUOTED_ASTERISK and ASTERISK_STRINGsrc/parser_bison.y+2 -20 replies
5/10scanner: allow strings starting by underscores and dotssrc/scanner.l+1 -10 replies
6/10scanner: remove range expressionsrc/scanner.l+0 -10 replies
7/10src: rename datatype name from tc_handle to classidinclude/datatype.h src/meta.c+5 -50 replies
8/10src: simplify classid printing using %x instead of %04xsrc/meta.c+1 -80 replies
9/10src: meta priority support using tc classidsrc/cli.c src/erec.c src/main.c +5 more+132 -220 replies
10/10parser_bison: redirect to :port for consistency with nat/masq statementsrc/parser_bison.y tests/py/ip/redirect.t tests/py/ip/redirect.t.payload +2 more+47 -380 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH nft 00/10 nft] syntax updates

Hi,

The following patchset is addressing part of the syntax issues that we have discussed during the NFWS.

1) Quote user-defined strings from rule selectors. The current behaviour is inconsistent since some selectors are quoting user-defined strings and others do not, so let's quote them all.

2) Add 'to' for snat and dnat to keep it consistent with redirect, masquerade, dup and fwd.

3) Support for Ipv6 address between brackets.

4) Missing QUOTED_STRING and ASTERISK_STRING token descriptions.

5) Allow strings that start by _ and . so we comply with POSIX.1-2008.

6) Kill useless range patter from scanner.

7,8,9) Add meta priority support using minor:major syntax.

10) Add colon after 'redirect to' for consistency with nat and masquerade.

Comments welcome.

Pablo Neira Ayuso (10):
src: quote user-defined strings when used from rule selectors
src: add 'to' for snat and dnat
src: support for RFC2732 IPv6 address format with brackets
parser_bison: missing token string in QUOTED_ASTERISK and ASTERISK_STRING
scanner: allow strings starting by underscores and dots
scanner: remove range expression
src: rename datatype name from tc_handle to classid
src: simplify classid printing using %x instead of %04x
src: meta priority support using tc classid
parser_bison: redirect to :port for consistency with nat/masq statement

 include/datatype.h                  |  6 +--
 src/cli.c                           |  8 +++
 src/ct.c                            |  2 +-
 src/datatype.c                      | 12 +++--
 src/erec.c                          |  1 +
 src/main.c                          |  3 +-
 src/meta.c                          | 66 ++++++++++++++-----------
 src/parser_bison.y                  | 27 ++++++----
 src/proto.c                         |  2 +-
 src/scanner.l                       | 16 +++++-
 src/statement.c                     | 26 ++++++++--
 tests/py/any/meta.t                 | 80 ++++++++++++++++--------------
 tests/py/any/meta.t.payload         | 99 ++++++++++++++++++++++++++++++++-----
 tests/py/ip/dnat.t                  | 16 +++---
 tests/py/ip/dnat.t.payload.ip       | 12 ++---
 tests/py/ip/redirect.t              | 24 ++++-----
 tests/py/ip/redirect.t.payload      | 20 ++++----
 tests/py/ip/snat.t                  | 12 ++---
 tests/py/ip/snat.t.payload          |  8 +--
 tests/py/ip6/dnat.t                 |  5 +-
 tests/py/ip6/dnat.t.payload.ip6     | 14 +++++-
 tests/py/ip6/redirect.t             | 18 +++----
 tests/py/ip6/redirect.t.payload.ip6 | 14 +++---
 tests/py/ip6/snat.t                 |  4 +-
 tests/py/ip6/snat.t.payload.ip6     |  4 +-
 25 files changed, 325 insertions(+), 174 deletions(-)
Signature · 1 line
2.1.4