Commit 2317c6b5 authored by Jarno Rajahalme's avatar Jarno Rajahalme Committed by David S. Miller

openvswitch: Set event bit after initializing labels.

Connlabels are included in conntrack netlink event messages only if
the IPCT_LABEL bit is set in the event cache (see
ctnetlink_conntrack_event()).  Set it after initializing labels for a
new connection.

Found upon further system testing, where it was noticed that labels
were missing from the conntrack events.

Fixes: 193e3096 ("openvswitch: Do not trigger events for unconfirmed connections.")
Signed-off-by: default avatarJarno Rajahalme <jarno@ovn.org>
Acked-by: default avatarPravin B Shelar <pshelar@ovn.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5ed3fea0
...@@ -339,9 +339,7 @@ static struct nf_conn_labels *ovs_ct_get_conn_labels(struct nf_conn *ct) ...@@ -339,9 +339,7 @@ static struct nf_conn_labels *ovs_ct_get_conn_labels(struct nf_conn *ct)
/* Initialize labels for a new, yet to be committed conntrack entry. Note that /* Initialize labels for a new, yet to be committed conntrack entry. Note that
* since the new connection is not yet confirmed, and thus no-one else has * since the new connection is not yet confirmed, and thus no-one else has
* access to it's labels, we simply write them over. Also, we refrain from * access to it's labels, we simply write them over.
* triggering events, as receiving change events before the create event would
* be confusing.
*/ */
static int ovs_ct_init_labels(struct nf_conn *ct, struct sw_flow_key *key, static int ovs_ct_init_labels(struct nf_conn *ct, struct sw_flow_key *key,
const struct ovs_key_ct_labels *labels, const struct ovs_key_ct_labels *labels,
...@@ -374,6 +372,11 @@ static int ovs_ct_init_labels(struct nf_conn *ct, struct sw_flow_key *key, ...@@ -374,6 +372,11 @@ static int ovs_ct_init_labels(struct nf_conn *ct, struct sw_flow_key *key,
& mask->ct_labels_32[i]); & mask->ct_labels_32[i]);
} }
/* Labels are included in the IPCTNL_MSG_CT_NEW event only if the
* IPCT_LABEL bit it set in the event cache.
*/
nf_conntrack_event_cache(IPCT_LABEL, ct);
memcpy(&key->ct.labels, cl->bits, OVS_CT_LABELS_LEN); memcpy(&key->ct.labels, cl->bits, OVS_CT_LABELS_LEN);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment