From 368fb7e6c02cf5be7d81cd99c44c837d5b71b6fc Mon Sep 17 00:00:00 2001 From: Joe Stringer Date: Fri, 7 Feb 2014 16:39:53 -0800 Subject: [PATCH] flow: Copy MPLS label on mpls_push. OpenFlow 1.3.3 spec (and earlier) specify that the default value for an MPLS label should be copied from the outer header. Signed-off-by: Joe Stringer Signed-off-by: Ben Pfaff --- lib/flow.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/flow.c b/lib/flow.c index 06ba036bf..e7fe4d349 100644 --- a/lib/flow.c +++ b/lib/flow.c @@ -1130,7 +1130,7 @@ flow_count_common_mpls_labels(const struct flow *a, int an, * If the new label is the second or label MPLS label in 'flow', it is * generated as; * - * - label: 0. + * - label: Copied from outer label. * * - TTL: Copied from outer label. * @@ -1156,7 +1156,7 @@ flow_push_mpls(struct flow *flow, int n, ovs_be16 mpls_eth_type, flow->mpls_lse[i] = flow->mpls_lse[i - 1]; } flow->mpls_lse[0] = (flow->mpls_lse[1] - & htonl(MPLS_TTL_MASK | MPLS_TC_MASK)); + & htonl(~MPLS_BOS_MASK)); } else { int label = 0; /* IPv4 Explicit Null. */ int tc = 0; -- 2.43.0