[ovs-dev] [DPDK Upcalls v3 1/3] flow: Parse MPLS should return the actual number of labels.

Ethan Jackson ethan at nicira.com
Thu Aug 14 01:46:16 UTC 2014


This problem is uncovered by a future patch.

Signed-off-by: Ethan Jackson <ethan at nicira.com>
Acked-by: Ben Pfaff <blp at nicira.com>
---
 lib/flow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/flow.c b/lib/flow.c
index 2e5ca0a..29b331e 100644
--- a/lib/flow.c
+++ b/lib/flow.c
@@ -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
-- 
1.8.1.2




More information about the dev mailing list