[ovs-dev] [PATCH v1] datapath-windows: Fix updating ct label when mask is specified

Anand Kumar kumaranand at vmware.com
Thu Aug 15 16:39:06 UTC 2019


From: kumaranand <kumaranand at vmware.com>

When an existing label needs to be changed by specifing bits to be
updated using mask, instead of updating only the masked bits,
new label was getting overridden. This patch fixes this issue.

Signed-off-by: Anand Kumar <kumaranand at vmware.com>
---
 datapath-windows/ovsext/Conntrack.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/datapath-windows/ovsext/Conntrack.c b/datapath-windows/ovsext/Conntrack.c
index bc00b60..ba56116 100644
--- a/datapath-windows/ovsext/Conntrack.c
+++ b/datapath-windows/ovsext/Conntrack.c
@@ -807,6 +807,7 @@ OvsConntrackSetLabels(OvsFlowKey *key,
     ovs_u128 v, m, pktMdLabel = {0};
     memcpy(&v, val, sizeof v);
     memcpy(&m, mask, sizeof m);
+    memcpy(&pktMdLabel, &entry->labels, sizeof(struct ovs_key_ct_labels));
 
     pktMdLabel.u64.lo = v.u64.lo | (pktMdLabel.u64.lo & ~(m.u64.lo));
     pktMdLabel.u64.hi = v.u64.hi | (pktMdLabel.u64.hi & ~(m.u64.hi));
-- 
2.9.3.windows.1



More information about the dev mailing list