Skip to contentSkip to conversation

net/sched: act_ct: fix err check for nf_conntrack_confirm

PATCH Applied [email protected] 2 participants 2 messages Jul 2, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/sched: act_ct: fix err check for nf_conntrack_confirm

From: wenxu <[email protected]>

The confirm operation should be checked. If there are any failed, the packet should be dropped like in ovs and netfilter.

Fixes b57dc7c13ea9 ("net/sched: Introduce action ct")
---
 net/sched/act_ct.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
net/sched/act_ct.c +2 -1
index a656baa..a62f404 100644
@@ -1026,7 +1026,8 @@ static int tcf_ct_act(struct sk_buff *skb, const struct tc_action *a,
 		/* This will take care of sending queued events
 		 * even if the connection is already confirmed.
 		 */
-		nf_conntrack_confirm(skb);
+		if (nf_conntrack_confirm(skb) != NF_ACCEPT)
+			goto drop;
 	}
 
 	if (!skip_add)
Signature · 1 line
1.8.3.1
#1 lore raw
This patch was applied to netdev/net.git (refs/heads/master):

Hello:

This patch was applied to netdev/net.git (refs/heads/master):

Quoted 9 lines · On Fri, 2 Jul 2021 11:34:31 +0800 you wrote:

From: wenxu <[email protected]>

The confirm operation should be checked. If there are any failed, the packet should be dropped like in ovs and netfilter.

Fixes b57dc7c13ea9 ("net/sched: Introduce action ct")

[...]

Here is the summary with links:
- net/sched: act_ct: fix err check for nf_conntrack_confirm

    https://git.kernel.org/netdev/net/c/8955b90c3cda

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html