netfilter: nf_tables: do not send complete notification of deletions
authorPablo Neira Ayuso <pablo@netfilter.org>
Thu, 20 Apr 2023 22:34:29 +0000 (00:34 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 21 Apr 2023 23:39:41 +0000 (01:39 +0200)
commit28339b21a365a8cb9edc6956cbfd679f569daa81
tree6f5e7981da217ce6d6fe4a2bda5d0749a5761dc0
parentc3c060adc0249355411a93e61888051e6902b8a1
netfilter: nf_tables: do not send complete notification of deletions

In most cases, table, name and handle is sufficient for userspace to
identify an object that has been deleted. Skipping unneeded fields in
the netlink attributes in the message saves bandwidth (ie. less chances
of hitting ENOBUFS).

Rules are an exception: the existing userspace monitor code relies on
the rule definition. This exception can be removed by implementing a
rule cache in userspace, this is already supported by the tracing
infrastructure.

Regarding flowtables, incremental deletion of devices is possible.
Skipping a full notification allows userspace to differentiate between
flowtable removal and incremental removal of devices.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_tables_api.c