mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-04-15 15:37:43 +07:00
openvswitch: Mark connections new when not confirmed.
New, related connections are marked as such as part of ovs_ct_lookup(), but they are not marked as "new" if the commit flag is used. Make this consistent by setting the "new" flag whenever !nf_ct_is_confirmed(ct). Reported-by: Jarno Rajahalme <jrajahalme@nicira.com> Signed-off-by: Joe Stringer <joestringer@nicira.com> Acked-by: Thomas Graf <tgraf@suug.ch> Acked-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
1d008a1df9
commit
4f0909ee3d
@ -151,6 +151,8 @@ static void ovs_ct_update_key(const struct sk_buff *skb,
|
|||||||
ct = nf_ct_get(skb, &ctinfo);
|
ct = nf_ct_get(skb, &ctinfo);
|
||||||
if (ct) {
|
if (ct) {
|
||||||
state = ovs_ct_get_state(ctinfo);
|
state = ovs_ct_get_state(ctinfo);
|
||||||
|
if (!nf_ct_is_confirmed(ct))
|
||||||
|
state |= OVS_CS_F_NEW;
|
||||||
if (ct->master)
|
if (ct->master)
|
||||||
state |= OVS_CS_F_RELATED;
|
state |= OVS_CS_F_RELATED;
|
||||||
zone = nf_ct_zone(ct);
|
zone = nf_ct_zone(ct);
|
||||||
@ -377,7 +379,7 @@ static bool skb_nfct_cached(const struct net *net, const struct sk_buff *skb,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int __ovs_ct_lookup(struct net *net, const struct sw_flow_key *key,
|
static int __ovs_ct_lookup(struct net *net, struct sw_flow_key *key,
|
||||||
const struct ovs_conntrack_info *info,
|
const struct ovs_conntrack_info *info,
|
||||||
struct sk_buff *skb)
|
struct sk_buff *skb)
|
||||||
{
|
{
|
||||||
@ -408,6 +410,8 @@ static int __ovs_ct_lookup(struct net *net, const struct sw_flow_key *key,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ovs_ct_update_key(skb, key, true);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -430,8 +434,6 @@ static int ovs_ct_lookup(struct net *net, struct sw_flow_key *key,
|
|||||||
err = __ovs_ct_lookup(net, key, info, skb);
|
err = __ovs_ct_lookup(net, key, info, skb);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
ovs_ct_update_key(skb, key, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -460,8 +462,6 @@ static int ovs_ct_commit(struct net *net, struct sw_flow_key *key,
|
|||||||
if (nf_conntrack_confirm(skb) != NF_ACCEPT)
|
if (nf_conntrack_confirm(skb) != NF_ACCEPT)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
ovs_ct_update_key(skb, key, true);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user