From 211f364ae8449634369b2e9e65df02fb74081f7b Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Tue, 7 Jan 2014 13:48:08 +0900 Subject: [PATCH] ofproto-dpif-xlate: Correct check for MPLS LSE zero is a valid MPLS LSE so it is not valid check against that value for MPLS LSE presence. Instead, check against the flow's dl_type which should be an MPLS type if an LSE is present. This problem appears to have been introduced by b2dd70be133bf86c ("Native Set-Field action."). Cc: Jarno Rajahalme Signed-off-by: Simon Horman Signed-off-by: Ben Pfaff --- ofproto/ofproto-dpif-xlate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c index 14e8fe2ba..ad60b07e2 100644 --- a/ofproto/ofproto-dpif-xlate.c +++ b/ofproto/ofproto-dpif-xlate.c @@ -2758,7 +2758,7 @@ do_xlate_actions(const struct ofpact *ofpacts, size_t ofpacts_len, * applicable header fields. Do nothing if no header exists. */ if ((mf->id != MFF_VLAN_VID || flow->vlan_tci & htons(VLAN_CFI)) && ((mf->id != MFF_MPLS_LABEL && mf->id != MFF_MPLS_TC) - || flow->mpls_lse)) { + || eth_type_mpls(flow->dl_type))) { mf_set_flow_value(mf, &set_field->value, flow); } break; -- 2.20.1