flow: Parse MPLS should return the actual number of labels.
authorEthan Jackson <ethan@nicira.com>
Fri, 1 Aug 2014 21:47:44 +0000 (14:47 -0700)
committerEthan Jackson <ethan@nicira.com>
Thu, 14 Aug 2014 20:42:47 +0000 (13:42 -0700)
This problem is uncovered by a future patch.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
lib/flow.c

index 2e5ca0a..29b331e 100644 (file)
@@ -210,7 +210,7 @@ parse_mpls(void **datap, size_t *sizep)
             break;
         }
     }
-    return MAX(count, FLOW_MAX_MPLS_LABELS);
+    return MIN(count, FLOW_MAX_MPLS_LABELS);
 }
 
 static inline ovs_be16