Skip to content

Commit

Permalink
openvswitch: Reset key metadata for packet execution.
Browse files Browse the repository at this point in the history
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: 0714812 ("openvswitch: Eliminate memset() from flow_extract.")
Signed-off-by: Pravin B Shelar <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Pravin B Shelar authored and davem330 committed Feb 11, 2015
1 parent 673e2ba commit b35725a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/openvswitch/flow.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b35725a

Please sign in to comment.