]> git.ipfire.org Git - thirdparty/nftables.git/commit
src: use cache infrastructure for set objects
authorPablo Neira Ayuso <pablo@netfilter.org>
Fri, 26 Jun 2015 09:33:22 +0000 (11:33 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 17 Aug 2015 23:13:35 +0000 (01:13 +0200)
commit05834a0fa84ee461b798308d57ffa1888c05d728
tree886c5f47d85be05773e141678bbb5cbab8260d6a
parent51d659450c1aecdd881c521ab290439d44125156
src: use cache infrastructure for set objects

This patch populates the cache only once through netlink_list_sets() during
evaluation. As a result, there is a single call to netlink_list_sets().

After this change, we can rid of get_set(). This function was fine by the time
we had no transaction support, but this doesn't work for set objects that are
declared in this batch, so inquiring the kernel doesn't help since they are not
yet available.

As a result from this update, the monitor code gets simplified quite a lot
since it can rely of the set cache. Moreover, we can now validate that the
table and set exists from evaluation path.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/evaluate.c
src/rule.c