Signed-off-by: Ben Pfaff <[email protected]>
---
I intend to fold this into
"Implement OpenFlow support for MPLS, for up to 3 labels."

diff --git a/lib/odp-util.c b/lib/odp-util.c
index 520b314..97e681d 100644
--- a/lib/odp-util.c
+++ b/lib/odp-util.c
@@ -2908,6 +2908,9 @@ parse_l2_5_onward(const struct nlattr 
*attrs[OVS_KEY_ATTR_MAX + 1],
         }
         if (n > ARRAY_SIZE(flow->mpls_lse)) {
             return ODP_FIT_TOO_MUCH;
+        } else if (n < ARRAY_SIZE(flow->mpls_lse)
+                   && !(flow->mpls_lse[n - 1] & htonl(MPLS_BOS_MASK))) {
+            return ODP_FIT_TOO_LITTLE;
         }
         goto done;
     } else if (src_flow->dl_type == htons(ETH_TYPE_IP)) {
-- 
1.7.10.4

_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to