From: Simon Horman Date: Tue, 7 Jan 2014 04:48:08 +0000 (+0900) Subject: ofproto-dpif-xlate: Correct check for MPLS LSE X-Git-Tag: v2.1.1~11 X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Fovs.git;a=commitdiff_plain;h=211f364ae8449634369b2e9e65df02fb74081f7b 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 --- 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;