Merge branch 'mainstream'
[sliver-openvswitch.git] / lib / dpif-netdev.c
index 48d8e27..afb2ef6 100644 (file)
@@ -702,6 +702,8 @@ static int
 dpif_netdev_flow_from_nlattrs(const struct nlattr *key, uint32_t key_len,
                               struct flow *flow)
 {
+    odp_port_t in_port;
+
     if (odp_flow_key_to_flow(key, key_len, flow) != ODP_FIT_PERFECT) {
         /* This should not happen: it indicates that odp_flow_key_from_flow()
          * and odp_flow_key_to_flow() disagree on the acceptable form of a
@@ -721,7 +723,8 @@ dpif_netdev_flow_from_nlattrs(const struct nlattr *key, uint32_t key_len,
         return EINVAL;
     }
 
-    if (!is_valid_port_number(flow->in_port.odp_port)) {
+    in_port = flow->in_port.odp_port;
+    if (!is_valid_port_number(in_port) && in_port != ODPP_NONE) {
         return EINVAL;
     }