APPLIED: [SRU][F:linux-bluefield][PATCH v2] net/sched: act_ct: fix err check for nf_conntrack_confirm
Stefan Bader
stefan.bader at canonical.com
Wed Jul 14 08:12:33 UTC 2021
On 07.07.21 16:00, 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 linux-next)
> 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>
> Acked-by: Tim Gardner <tim.gardner at canonical.com>
> ---
Applied to focal:linux-bluefield/master-next. Thanks.
-Stefan
> 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)
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20210714/62164ead/attachment.sig>
More information about the kernel-team
mailing list