ofp-actions: Correct pop MPLS ethtype as consistency test
authorSimon Horman <horms@verge.net.au>
Wed, 19 Feb 2014 12:27:16 +0000 (21:27 +0900)
committerBen Pfaff <blp@nicira.com>
Wed, 19 Feb 2014 21:33:17 +0000 (13:33 -0800)
commitb3f2fc93e3f357f8d05a92f53ec253339a40887f
treefb1395e2c72e9474a3a795ce301a48bdb5ccdcb1
parent95a93307cb10d9ddb2c4c99a5e2055883371020a
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>
lib/ofp-actions.c