Synchronize code with upstream ovs_nla_get_flow_metadata().

Signed-off-by: Pravin B Shelar <[email protected]>
---
 datapath/flow.c         | 2 ++
 datapath/flow_netlink.c | 1 -
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/datapath/flow.c b/datapath/flow.c
index 4e6dfb2..390286c 100644
--- a/datapath/flow.c
+++ b/datapath/flow.c
@@ -732,6 +732,8 @@ int ovs_flow_key_extract_userspace(struct net *net, const 
struct nlattr *attr,
 {
        int err;
 
+       memset(key, 0, OVS_SW_FLOW_KEY_METADATA_SIZE);
+
        /* Extract metadata from netlink attributes. */
        err = ovs_nla_get_flow_metadata(net, attr, key, log);
        if (err)
diff --git a/datapath/flow_netlink.c b/datapath/flow_netlink.c
index fc0ee10..bc87090 100644
--- a/datapath/flow_netlink.c
+++ b/datapath/flow_netlink.c
@@ -1406,7 +1406,6 @@ int ovs_nla_get_flow_metadata(struct net *net, const 
struct nlattr *attr,
        memset(&match, 0, sizeof(match));
        match.key = key;
 
-       memset(key, 0, OVS_SW_FLOW_KEY_METADATA_SIZE);
        memset(&key->ct, 0, sizeof(key->ct));
        key->phy.in_port = DP_MAX_PORTS;
 
-- 
1.9.1

_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to