]> git.proxmox.com Git - ovs.git/commitdiff
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 2e5ca0a8fe15c2b9b41ebed48bc7511df8df7735..29b331e07157d2d9051aac37f37684d6102e3f2b 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