提交 60177a55 编写于 作者: F Flavio Leitner 提交者: Xie XiuQi

openvswitch: add seqadj extension when NAT is used.

mainline inclusion
from mainline-5.1
commit fa7e428c6b7e
category: bugfix
bugzilla: 15030
CVE: NA

-------------------------------------------------

When the conntrack is initialized, there is no helper attached
yet so the nat info initialization (nf_nat_setup_info) skips
adding the seqadj ext.

A helper is attached later when the conntrack is not confirmed
but is going to be committed. In this case, if NAT is needed then
adds the seqadj ext as well.

Fixes: 16ec3d4f ("openvswitch: Fix cached ct with helper.")
Signed-off-by: NFlavio Leitner <fbl@sysclose.org>
Acked-by: NPravin B Shelar <pshelar@ovn.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NZhiqiang Liu <liuzhiqiang26@huawei.com>
Reviewed-by: NWenan Mao <maowenan@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 e74408de
...@@ -988,6 +988,12 @@ static int __ovs_ct_lookup(struct net *net, struct sw_flow_key *key, ...@@ -988,6 +988,12 @@ static int __ovs_ct_lookup(struct net *net, struct sw_flow_key *key,
GFP_ATOMIC); GFP_ATOMIC);
if (err) if (err)
return err; return err;
/* helper installed, add seqadj if NAT is required */
if (info->nat && !nfct_seqadj(ct)) {
if (!nfct_seqadj_ext_add(ct))
return -EINVAL;
}
} }
/* Call the helper only if: /* Call the helper only if:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册