datapath: Avoid using wrong metadata for recic action.
[cascardo/ovs.git] / datapath / flow.c
index 5fa3491..ee835d1 100644 (file)
@@ -636,3 +636,14 @@ int ovs_flow_key_extract_userspace(const struct nlattr *attr,
 
        return key_extract(skb, key);
 }
+
+int ovs_flow_key_extract_recirc(u32 recirc_id,
+                               const struct sw_flow_key *key,
+                               struct sk_buff *skb,
+                               struct sw_flow_key *new_key)
+{
+       memset(new_key, 0, sizeof(*new_key));
+       memcpy(new_key, key, OVS_SW_FLOW_KEY_METADATA_SIZE);
+       new_key->recirc_id = recirc_id;
+       return key_extract(skb, new_key);
+}