* [PATCH net-next] openvswitch: Set event bit after initializing labels.
@ 2017-02-18 2:11 Jarno Rajahalme
2017-02-20 5:50 ` Pravin Shelar
2017-02-20 15:19 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Jarno Rajahalme @ 2017-02-18 2:11 UTC (permalink / raw)
To: netdev; +Cc: jarno, pshelar
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: 193e30967897 ("openvswitch: Do not trigger events for unconfirmed connections.")
Signed-off-by: Jarno Rajahalme <jarno@ovn.org>
---
net/openvswitch/conntrack.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/net/openvswitch/conntrack.c b/net/openvswitch/conntrack.c
index c2d452e..85cd595 100644
--- a/net/openvswitch/conntrack.c
+++ b/net/openvswitch/conntrack.c
@@ -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
* 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
- * triggering events, as receiving change events before the create event would
- * be confusing.
+ * access to it's labels, we simply write them over.
*/
static int ovs_ct_init_labels(struct nf_conn *ct, struct sw_flow_key *key,
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,
& 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);
return 0;
--
2.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] openvswitch: Set event bit after initializing labels.
2017-02-18 2:11 [PATCH net-next] openvswitch: Set event bit after initializing labels Jarno Rajahalme
@ 2017-02-20 5:50 ` Pravin Shelar
2017-02-20 15:19 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Pravin Shelar @ 2017-02-20 5:50 UTC (permalink / raw)
To: Jarno Rajahalme; +Cc: Linux Kernel Network Developers
On Fri, Feb 17, 2017 at 6:11 PM, Jarno Rajahalme <jarno@ovn.org> wrote:
> 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: 193e30967897 ("openvswitch: Do not trigger events for unconfirmed connections.")
> Signed-off-by: Jarno Rajahalme <jarno@ovn.org>
Acked-by: Pravin B Shelar <pshelar@ovn.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] openvswitch: Set event bit after initializing labels.
2017-02-18 2:11 [PATCH net-next] openvswitch: Set event bit after initializing labels Jarno Rajahalme
2017-02-20 5:50 ` Pravin Shelar
@ 2017-02-20 15:19 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2017-02-20 15:19 UTC (permalink / raw)
To: jarno; +Cc: netdev, pshelar
From: Jarno Rajahalme <jarno@ovn.org>
Date: Fri, 17 Feb 2017 18:11:58 -0800
> 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: 193e30967897 ("openvswitch: Do not trigger events for unconfirmed connections.")
> Signed-off-by: Jarno Rajahalme <jarno@ovn.org>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-02-20 15:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-18 2:11 [PATCH net-next] openvswitch: Set event bit after initializing labels Jarno Rajahalme
2017-02-20 5:50 ` Pravin Shelar
2017-02-20 15:19 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.