Skip to content

Commit

Permalink
datapath: Move key memset to ovs_flow_key_extract_userspace()
Browse files Browse the repository at this point in the history
Synchronize code with upstream ovs_nla_get_flow_metadata().

Signed-off-by: Pravin B Shelar <[email protected]>
Acked-by: Jesse Gross <[email protected]>
  • Loading branch information
pshelar committed Jul 17, 2016
1 parent 54125dd commit 2250cb8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 2 additions & 0 deletions datapath/flow.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion datapath/flow_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 2250cb8

Please sign in to comment.