Skip to content

Misc parser fixes

Florian Westphal netfilter-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6json: dccp: remove erroneous const qualifiersrc/parser_json.c+1 -10 replies
2/6evaluate: do not abort when prefix map has non-map elementsrc/evaluate.c tests/shell/testcases/bogons/assert_failures tests/shell/testcases/bogons/nft-f/nat_prefix_map_with_set_element_assert+32 -40 replies
3/6parser: don't assert on scope underflowssrc/parser_bison.y tests/shell/testcases/bogons/nft-f/scope_underflow_assert+7 -20 replies
4/6parser: reject zero-length interface namessrc/parser_bison.y tests/shell/testcases/bogons/nft-f/zero_length_devicename_assert+36 -51 reply
5/6parser: reject zero-length interface names in flowtablessrc/parser_bison.y tests/shell/testcases/bogons/nft-f/zero_length_devicename_flowtable_assert+17 -80 replies
6/6ct timeout: fix 'list object x' vs. 'list objects in table' confusioninclude/rule.h src/cache.c src/evaluate.c +2 more+5 -10 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 0/6] Misc parser fixes

These patches fix various bugs in the parsing
and evaluation steps.

I added a new 'bogons' test dir to shell, this can be used to collect invalid inputs that should be rejected instead of nft exiting with an assertion failure.

Florian Westphal (6):
json: dccp: remove erroneous const qualifier
evaluate: do not abort when prefix map has non-map element
parser: don't assert on scope underflows
parser: reject zero-length interface names
parser: reject zero-length interface names in flowtables ct timeout: fix 'list object x' vs. 'list objects in table' confusion

 include/rule.h                                |  1 +
 src/cache.c                                   |  1 +
 src/evaluate.c                                | 18 ++++--
 src/parser_bison.y                            | 61 ++++++++++++++-----
 src/parser_json.c                             |  2 +-
 src/rule.c                                    |  1 +
 tests/shell/testcases/bogons/assert_failures  | 12 ++++
 .../nat_prefix_map_with_set_element_assert    |  7 +++
 .../bogons/nft-f/scope_underflow_assert       |  6 ++
 .../nft-f/zero_length_devicename_assert       |  5 ++
 .../zero_length_devicename_flowtable_assert   |  5 ++
 11 files changed, 98 insertions(+), 21 deletions(-)
 create mode 100755 tests/shell/testcases/bogons/assert_failures
 create mode 100644 tests/shell/testcases/bogons/nft-f/nat_prefix_map_with_set_element_assert
 create mode 100644 tests/shell/testcases/bogons/nft-f/scope_underflow_assert
 create mode 100644 tests/shell/testcases/bogons/nft-f/zero_length_devicename_assert
 create mode 100644 tests/shell/testcases/bogons/nft-f/zero_length_devicename_flowtable_assert
Signature · 1 line
2.39.3