Skip to content

enhance stateful expression support

Pablo Neira Ayuso netfilter-devel 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 1 replyIn review
  2. v14 patches 0 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5netfilter: nf_tables: add nft_set_elem_expr_alloc()include/net/netfilter/nf_tables.h net/netfilter/nf_tables_api.c net/netfilter/nft_dynset.c+36 -130 replies
2/5netfilter: nf_tables: remove EXPORT_SYMBOL_GPL for nft_expr_init()include/net/netfilter/nf_tables.h net/netfilter/nf_tables_api.c+2 -41 reply
3/5netfilter: nf_tables: add elements with stateful expressionsnet/netfilter/nf_tables_api.c+20 -10 replies
4/5netfilter: nf_tables: add nft_set_elem_update_expr() helper functioninclude/net/netfilter/nf_tables.h net/netfilter/nft_dynset.c+13 -70 replies
5/5netfilter: nft_lookup: update element stateful expressionnet/netfilter/nft_lookup.c+1 -00 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH 0/5 nf-next,v2] enhance stateful expression support

This patchset allows users to add and to restore stateful expressions of set elements, e.g.

 table ip test {
        set test {
                type ipv4_addr
                size 65535
                flags dynamic,timeout
                timeout 30d
                gc-interval 1d
                elements = { 192.168.10.13 expires 19d23h52m27s576ms counter packets 51 bytes 17265 }
        }
        chain output {
                type filter hook output priority 0;
                update @test { ip saddr }
        }

}

You can also add counters to elements from the control place, ie.

 table ip test {
        set test {
                type ipv4_addr
                size 65535
                elements = { 192.168.2.1 counter packets 75 bytes 19043 }
        }

        chain output {
                type filter hook output priority filter; policy accept;
                ip daddr @test
        }

}

v2: Missing patch to add nft_set_elem_expr_alloc() helper function.

Pablo Neira Ayuso (5):
netfilter: nf_tables: add nft_set_elem_expr_alloc()
netfilter: nf_tables: remove EXPORT_SYMBOL_GPL for nft_expr_init()
netfilter: nf_tables: add elements with stateful expressions
netfilter: nf_tables: add nft_set_elem_update_expr() helper function
netfilter: nft_lookup: update element stateful expression

 include/net/netfilter/nf_tables.h | 18 +++++++++++--
 net/netfilter/nf_tables_api.c     | 55 ++++++++++++++++++++++++++++++++++++---
 net/netfilter/nft_dynset.c        | 23 +++-------------
 net/netfilter/nft_lookup.c        |  1 +
 4 files changed, 72 insertions(+), 25 deletions(-)

--
2.11.0