From: Joe Stringer Date: Sat, 8 Feb 2014 00:39:53 +0000 (-0800) Subject: flow: Copy MPLS label on mpls_push. X-Git-Tag: sliver-openvswitch-2.1.90-1~1^2~69 X-Git-Url: http://git.onelab.eu/?p=sliver-openvswitch.git;a=commitdiff_plain;h=368fb7e6c02cf5be7d81cd99c44c837d5b71b6fc 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 --- 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;