netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH nft v2 0/2] Fix evaluation of anonymous sets with concatenated ranges
@ 2020-05-27 20:51 Stefano Brivio
  2020-05-27 20:51 ` [PATCH nft v2 1/2] evaluate: Perform set evaluation on implicitly declared (anonymous) sets Stefano Brivio
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Stefano Brivio @ 2020-05-27 20:51 UTC (permalink / raw)
  To: Pablo Neira Ayuso; +Cc: Phil Sutter, netfilter-devel

As reported by both Pablo and Phil, trying to add an anonymous set
containing a concatenated range would fail:

  # nft add rule x y ip saddr . tcp dport { 192.168.2.1 . 20-30 } accept
  BUG: invalid range expression type concat
  nft: expression.c:1160: range_expr_value_low: Assertion `0' failed.
  Aborted

  # nft add rule t c ip daddr . tcp dport '{ 10.0.0.0/8 . 10-23, 192.168.1.1-192.168.3.8 . 80-443 } accept'
  BUG: invalid range expression type concat
  nft: expression.c:1296: range_expr_value_low: Assertion `0' failed.

Patch 1/2 fixes this, and 2/2 enables a test for it in inet/sets.t.

v2: Don't add anonymous sets to cache, fix leak for object maps, and
    use existing test rule instead of adding a new test

Stefano Brivio (2):
  evaluate: Perform set evaluation on implicitly declared (anonymous)
    sets
  tests: py: Enable anonymous set rule with concatenated ranges in
    inet/sets.t

 src/evaluate.c                      | 20 ++++++++++----------
 tests/py/inet/sets.t                |  2 +-
 tests/py/inet/sets.t.payload.bridge | 14 ++++++++++++++
 tests/py/inet/sets.t.payload.inet   | 13 +++++++++++++
 tests/py/inet/sets.t.payload.netdev | 13 +++++++++++++
 5 files changed, 51 insertions(+), 11 deletions(-)

-- 
2.26.2


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-05-28  0:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-27 20:51 [PATCH nft v2 0/2] Fix evaluation of anonymous sets with concatenated ranges Stefano Brivio
2020-05-27 20:51 ` [PATCH nft v2 1/2] evaluate: Perform set evaluation on implicitly declared (anonymous) sets Stefano Brivio
2020-05-27 20:51 ` [PATCH nft v2 2/2] tests: py: Enable anonymous set rule with concatenated ranges in inet/sets.t Stefano Brivio
2020-05-28  0:09 ` [PATCH nft v2 0/2] Fix evaluation of anonymous sets with concatenated ranges Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).