NAK: [SRU][F:linux-bluefield][PATCH] net/sched: act_ct: fix err check for nf_conntrack_confirm
Tim Gardner
tim.gardner at canonical.com
Wed Jul 7 14:03:23 UTC 2021
See v2
On 7/6/21 2:12 PM, Bodong Wang wrote:
> From: wenxu <wenxu at ucloud.cn>
>
> BugLink: https://bugs.launchpad.net/bugs/1934819
>
> 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")
> Signed-off-by: wenxu <wenxu at ucloud.cn>
> Signed-off-by: David S. Miller <davem at davemloft.net>
> (cherry picked from commit 8955b90c3cdad199137809aac8ccbbb585355913)
> https://patchwork.kernel.org/project/netdevbpf/patch/1625196871-2780-1-git-send-email-wenxu@ucloud.cn/
> Signed-off-by: Bodong Wang <bodong at nvidia.com>
> ---
> net/sched/act_ct.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/net/sched/act_ct.c b/net/sched/act_ct.c
> index 43c5b3f..6299214 100644
> --- a/net/sched/act_ct.c
> +++ b/net/sched/act_ct.c
> @@ -1004,7 +1004,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)
>
--
-----------
Tim Gardner
Canonical, Inc
More information about the kernel-team
mailing list