diff options
author | wenxu <wenxu@ucloud.cn> | 2021-07-02 11:34:31 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-07-25 14:37:33 +0200 |
commit | c6eb7ce9f11c955ea29302dbd107cc4c6c544b45 (patch) | |
tree | a35c0ffcc59cf270ca944188af78ff581b2d03da | |
parent | a598091fc909b26c8d72cfaa6f90da1b2c1a1858 (diff) | |
download | linux-stable-c6eb7ce9f11c955ea29302dbd107cc4c6c544b45.tar.gz linux-stable-c6eb7ce9f11c955ea29302dbd107cc4c6c544b45.tar.bz2 linux-stable-c6eb7ce9f11c955ea29302dbd107cc4c6c544b45.zip |
net/sched: act_ct: fix err check for nf_conntrack_confirm
commit 8955b90c3cdad199137809aac8ccbbb585355913 upstream.
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@ucloud.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | net/sched/act_ct.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/sched/act_ct.c b/net/sched/act_ct.c index a656baa321fe..a62f404d0e16 100644 --- a/net/sched/act_ct.c +++ b/net/sched/act_ct.c @@ -1026,7 +1026,8 @@ do_nat: /* 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) |