2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +00:00

ofp-actions: Correct pop MPLS ethtype as consistency test

Correct pop MPLS ethtype consistency check to verify that
the packet has an MPLS ethtype before the pop action rather than after:
an MPLS ethtype is a pre-condition but not a post-condition of pop MPLS.

With this change the consistency check in ofpact_check__()
becomes consistent with that in ofpact_from_nxast().

This was found using Ryu tests via the new make check-ryu target.
It allows all of the "POP_MPLS"[1] tests to pass where they previously
failed.

[1] http://osrg.github.io/ryu-certification/switch/ovs

Cc: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
Simon Horman
2014-02-19 21:27:16 +09:00
committed by Ben Pfaff
parent 95a93307cb
commit b3f2fc93e3

View File

@@ -2067,10 +2067,10 @@ ofpact_check__(enum ofputil_protocol *usable_protocols, struct ofpact *a,
return 0;
case OFPACT_POP_MPLS:
flow->dl_type = ofpact_get_POP_MPLS(a)->ethertype;
if (!eth_type_mpls(flow->dl_type)) {
inconsistent_match(usable_protocols);
}
flow->dl_type = ofpact_get_POP_MPLS(a)->ethertype;
return 0;
case OFPACT_SAMPLE: