ofp-actions: Allow pop_mpls on MPLS packets
authorSimon Horman <horms@verge.net.au>
Mon, 23 Jun 2014 23:46:32 +0000 (08:46 +0900)
committerBen Pfaff <blp@nicira.com>
Wed, 25 Jun 2014 21:15:06 +0000 (14:15 -0700)
With recirculation in place this should be safe.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/ofp-actions.c

index dc74e8a..9849771 100644 (file)
@@ -492,9 +492,6 @@ ofpact_from_nxast(const union ofp_action *a, enum ofputil_action_code code,
         break;
 
     case OFPUTIL_NXAST_POP_MPLS:
-        if (eth_type_mpls(a->pop_mpls.ethertype)) {
-            return OFPERR_OFPBAC_BAD_ARGUMENT;
-        }
         ofpact_put_POP_MPLS(out)->ethertype = a->pop_mpls.ethertype;
         break;
 
@@ -1260,9 +1257,6 @@ ofpact_from_openflow11(const union ofp_action *a, enum ofp_version version,
         break;
 
     case OFPUTIL_OFPAT11_POP_MPLS:
-        if (eth_type_mpls(a->ofp11_pop_mpls.ethertype)) {
-            return OFPERR_OFPBAC_BAD_ARGUMENT;
-        }
         ofpact_put_POP_MPLS(out)->ethertype = a->ofp11_pop_mpls.ethertype;
         break;