netfilter: nf_tables: Introduce NFT_MSG_GETSETELEM_RESET
Subsystems (2)
Phil Sutter
reviewerPATCH 1/1 netfilter: nf_tables: Introduce NFT_MSG_GETSETELEM_RESET
Analogous to NFT_MSG_GETOBJ_RESET, but for set elements with a timeout or attached stateful expressions like counters or quotas - reset them all at once. Respect a per element timeout value if present to reset the 'expires' value to.
Signed-off-by Phil Sutter <[email protected]>
--- include/uapi/linux/netfilter/nf_tables.h | 2 + net/netfilter/nf_tables_api.c | 68 +++++++++++++++++------- 2 files changed, 50 insertions(+), 20 deletions(-)
include/uapi/linux/netfilter/nf_tables.h +2 -0
@@ -105,6 +105,7 @@ enum nft_verdicts {* @NFT_MSG_DESTROYSETELEM: destroy a set element (enum nft_set_elem_attributes) * @NFT_MSG_DESTROYOBJ: destroy a stateful object (enum nft_object_attributes) * @NFT_MSG_DESTROYFLOWTABLE: destroy flow table (enum nft_flowtable_attributes) +* @NFT_MSG_GETSETELEM_RESET: get set elements and reset attached stateful expressions (enum nft_set_elem_attributes) */ enum nf_tables_msg_types {NFT_MSG_NEWTABLE ,
@@ -140,6 +141,7 @@ enum nf_tables_msg_types {NFT_MSG_DESTROYSETELEM ,NFT_MSG_DESTROYOBJ ,NFT_MSG_DESTROYFLOWTABLE , +NFT_MSG_GETSETELEM_RESET , NFT_MSG_MAX, };
net/netfilter/nf_tables_api.c +48 -20
207 lines not on this page · raw message
Signature · 1 line
2.40.0