All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH nf] netfilter: nf_tables: do not refresh timeout when resetting element
@ 2023-10-02  9:05 Pablo Neira Ayuso
  2023-10-02  9:07 ` Florian Westphal
  2023-10-02 18:06 ` Phil Sutter
  0 siblings, 2 replies; 21+ messages in thread
From: Pablo Neira Ayuso @ 2023-10-02  9:05 UTC (permalink / raw)
  To: netfilter-devel; +Cc: phil

The dump and reset command should not refresh the timeout, this command
is intended to allow users to list existing stateful objects and reset
them, element expiration should be refresh via transaction instead with
a specific command to achieve this, otherwise this is entering combo
semantics that will be hard to be undone later (eg. a user asking to
retrieve counters but _not_ requiring to refresh expiration).

Fixes: 079cd633219d ("netfilter: nf_tables: Introduce NFT_MSG_GETSETELEM_RESET")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
 net/netfilter/nf_tables_api.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index 3bb5ea5d4eed..0e375b7a7cad 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -5615,9 +5615,6 @@ static int nf_tables_fill_setelem(struct sk_buff *skb,
 				 nf_jiffies64_to_msecs(expires),
 				 NFTA_SET_ELEM_PAD))
 			goto nla_put_failure;
-
-		if (reset)
-			*nft_set_ext_expiration(ext) = now + timeout;
 	}
 
 	if (nft_set_ext_exists(ext, NFT_SET_EXT_USERDATA)) {
-- 
2.30.2


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

end of thread, other threads:[~2023-10-10 13:18 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-02  9:05 [PATCH nf] netfilter: nf_tables: do not refresh timeout when resetting element Pablo Neira Ayuso
2023-10-02  9:07 ` Florian Westphal
2023-10-02 18:06 ` Phil Sutter
2023-10-02 21:50   ` Pablo Neira Ayuso
2023-10-02 22:17     ` Pablo Neira Ayuso
2023-10-02 22:55       ` Phil Sutter
2023-10-03  7:46         ` Pablo Neira Ayuso
2023-10-03 15:57           ` Phil Sutter
2023-10-03 17:21             ` Pablo Neira Ayuso
2023-10-03 17:52               ` Phil Sutter
2023-10-03 18:03                 ` Pablo Neira Ayuso
2023-10-03 20:12                   ` Phil Sutter
2023-10-04  8:01                     ` Pablo Neira Ayuso
2023-10-04  8:07                       ` Florian Westphal
2023-10-04  8:23                         ` Pablo Neira Ayuso
2023-10-04  8:46                           ` Florian Westphal
2023-10-04  9:27                             ` Pablo Neira Ayuso
2023-10-04 12:48                               ` Florian Westphal
2023-10-04 14:32                                 ` Pablo Neira Ayuso
2023-10-10 12:48                                   ` Phil Sutter
2023-10-10 13:18                                 ` Phil Sutter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.