summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorPravin B Shelar <pshelar@nicira.com>2015-02-10 13:35:16 -0800
committerDavid S. Miller <davem@davemloft.net>2015-02-11 14:40:15 -0800
commitb35725a285768d85b5ba1be7fe5002654a65ce88 (patch)
treeb17534490b4f67d0a36ac20941c6cf97a6c57f6f /net
parent673e2baaa6d986e2fcd9c867661d8113f6c7dc7b (diff)
downloadop-kernel-dev-b35725a285768d85b5ba1be7fe5002654a65ce88.zip
op-kernel-dev-b35725a285768d85b5ba1be7fe5002654a65ce88.tar.gz
openvswitch: Reset key metadata for packet execution.
Userspace packet execute command pass down flow key for given packet. But userspace can skip some parameter with zero value. Therefore kernel needs to initialize key metadata to zero. Fixes: 0714812134 ("openvswitch: Eliminate memset() from flow_extract.") Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/openvswitch/flow.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/openvswitch/flow.c b/net/openvswitch/flow.c
index e2c348b..50ec42f 100644
--- a/net/openvswitch/flow.c
+++ b/net/openvswitch/flow.c
@@ -717,6 +717,8 @@ int ovs_flow_key_extract_userspace(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(attr, key, log);
if (err)
OpenPOWER on IntegriCloud