Skip to content

Commit

Permalink
ofproto-dpif-xlate: Correct check for MPLS LSE
Browse files Browse the repository at this point in the history
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
b2dd70b ("Native Set-Field action.").

Cc: Jarno Rajahalme <[email protected]>
Signed-off-by: Simon Horman <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
horms authored and blp committed Jan 7, 2014
1 parent c4e976d commit f8b63ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ofproto/ofproto-dpif-xlate.c
Original file line number Diff line number Diff line change
Expand Up @@ -2754,7 +2754,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;
Expand Down

0 comments on commit f8b63ee

Please sign in to comment.