netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [nft PATCH 0/4] Two bugfixes around prefixes in sets
@ 2020-04-30 15:14 Phil Sutter
  2020-04-30 15:14 ` [nft PATCH 1/4] segtree: Fix missing expires value in prefixes Phil Sutter
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Phil Sutter @ 2020-04-30 15:14 UTC (permalink / raw)
  To: Pablo Neira Ayuso; +Cc: netfilter-devel

Patch 1 fixes a pretty obvious typo, leading to prefixes not showing
their expiry time.

The remaining patches deal with wrong behaviour of 'get element' command
when looking up prefixes. This could have been simple, 'get element'
would return the prefix address but prefix length was missing.

While digging through the code, I eventually found out that
get_set_interval_find() and get_set_interval_end() didn't respect prefix
elements but cared about range elements only.

I am still not entirely sure how the code really works and why
everything is needed, but the test case added in patch 4 and some debug
output showed that things could be simplified quite a bit. Since this
also streamlined adding prefix support, I went ahead with it.

Phil Sutter (4):
  segtree: Fix missing expires value in prefixes
  segtree: Use expr_clone in get_set_interval_*()
  segtree: Merge get_set_interval_find() and get_set_interval_end()
  segtree: Fix get element command with prefixes

 src/segtree.c                                | 70 +++++---------------
 tests/shell/testcases/sets/0034get_element_0 | 51 +++++++++-----
 2 files changed, 51 insertions(+), 70 deletions(-)

-- 
2.25.1


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

end of thread, other threads:[~2020-05-04 12:53 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-30 15:14 [nft PATCH 0/4] Two bugfixes around prefixes in sets Phil Sutter
2020-04-30 15:14 ` [nft PATCH 1/4] segtree: Fix missing expires value in prefixes Phil Sutter
2020-04-30 15:14 ` [nft PATCH 2/4] segtree: Use expr_clone in get_set_interval_*() Phil Sutter
2020-04-30 15:14 ` [nft PATCH 3/4] segtree: Merge get_set_interval_find() and get_set_interval_end() Phil Sutter
2020-04-30 15:37   ` Pablo Neira Ayuso
2020-04-30 15:41     ` Pablo Neira Ayuso
2020-05-04 12:53       ` Phil Sutter
2020-04-30 15:48     ` Phil Sutter
2020-04-30 15:52       ` Pablo Neira Ayuso
2020-04-30 16:01         ` Phil Sutter
2020-05-01 11:05           ` Pablo Neira Ayuso
2020-04-30 15:14 ` [nft PATCH 4/4] segtree: Fix get element command with prefixes Phil Sutter

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).