netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v1] netfilter: cttimeout: remove 'l3num' attr check
@ 2024-05-31  1:28 Lin Ma
  2024-06-04 16:48 ` Simon Horman
  2024-06-26 11:33 ` Pablo Neira Ayuso
  0 siblings, 2 replies; 3+ messages in thread
From: Lin Ma @ 2024-05-31  1:28 UTC (permalink / raw)
  To: pablo, kadlec, davem, edumazet, kuba, pabeni, netfilter-devel,
	coreteam, netdev, linux-kernel
  Cc: Lin Ma

After commit dd2934a95701 ("netfilter: conntrack: remove l3->l4 mapping
information"), the attribute of type `CTA_TIMEOUT_L3PROTO` is not used
any more in function cttimeout_default_set.

However, the previous commit ea9cf2a55a7b ("netfilter: cttimeout: remove
set but not used variable 'l3num'") forgot to remove the attribute
present check when removing the related variable.

This commit removes that check to ensure consistency.

Signed-off-by: Lin Ma <linma@zju.edu.cn>
---
 net/netfilter/nfnetlink_cttimeout.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/net/netfilter/nfnetlink_cttimeout.c b/net/netfilter/nfnetlink_cttimeout.c
index f466af4f8531..eab4f476b47f 100644
--- a/net/netfilter/nfnetlink_cttimeout.c
+++ b/net/netfilter/nfnetlink_cttimeout.c
@@ -366,8 +366,7 @@ static int cttimeout_default_set(struct sk_buff *skb,
 	__u8 l4num;
 	int ret;
 
-	if (!cda[CTA_TIMEOUT_L3PROTO] ||
-	    !cda[CTA_TIMEOUT_L4PROTO] ||
+	if (!cda[CTA_TIMEOUT_L4PROTO] ||
 	    !cda[CTA_TIMEOUT_DATA])
 		return -EINVAL;
 
-- 
2.34.1


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

* Re: [PATCH net-next v1] netfilter: cttimeout: remove 'l3num' attr check
  2024-05-31  1:28 [PATCH net-next v1] netfilter: cttimeout: remove 'l3num' attr check Lin Ma
@ 2024-06-04 16:48 ` Simon Horman
  2024-06-26 11:33 ` Pablo Neira Ayuso
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2024-06-04 16:48 UTC (permalink / raw)
  To: Lin Ma
  Cc: pablo, kadlec, davem, edumazet, kuba, pabeni, netfilter-devel,
	coreteam, netdev, linux-kernel

On Fri, May 31, 2024 at 09:28:47AM +0800, Lin Ma wrote:
> After commit dd2934a95701 ("netfilter: conntrack: remove l3->l4 mapping
> information"), the attribute of type `CTA_TIMEOUT_L3PROTO` is not used
> any more in function cttimeout_default_set.
> 
> However, the previous commit ea9cf2a55a7b ("netfilter: cttimeout: remove
> set but not used variable 'l3num'") forgot to remove the attribute
> present check when removing the related variable.
> 
> This commit removes that check to ensure consistency.
> 
> Signed-off-by: Lin Ma <linma@zju.edu.cn>

Reviewed-by: Simon Horman <horms@kernel.org>


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

* Re: [PATCH net-next v1] netfilter: cttimeout: remove 'l3num' attr check
  2024-05-31  1:28 [PATCH net-next v1] netfilter: cttimeout: remove 'l3num' attr check Lin Ma
  2024-06-04 16:48 ` Simon Horman
@ 2024-06-26 11:33 ` Pablo Neira Ayuso
  1 sibling, 0 replies; 3+ messages in thread
From: Pablo Neira Ayuso @ 2024-06-26 11:33 UTC (permalink / raw)
  To: Lin Ma
  Cc: kadlec, davem, edumazet, kuba, pabeni, netfilter-devel, coreteam,
	netdev, linux-kernel

On Fri, May 31, 2024 at 09:28:47AM +0800, Lin Ma wrote:
> After commit dd2934a95701 ("netfilter: conntrack: remove l3->l4 mapping
> information"), the attribute of type `CTA_TIMEOUT_L3PROTO` is not used
> any more in function cttimeout_default_set.
> 
> However, the previous commit ea9cf2a55a7b ("netfilter: cttimeout: remove
> set but not used variable 'l3num'") forgot to remove the attribute
> present check when removing the related variable.
> 
> This commit removes that check to ensure consistency.

Applied to nf-next, thanks

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

end of thread, other threads:[~2024-06-26 11:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-31  1:28 [PATCH net-next v1] netfilter: cttimeout: remove 'l3num' attr check Lin Ma
2024-06-04 16:48 ` Simon Horman
2024-06-26 11:33 ` Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).