ofp-actions: Consider L4 actions after mpls_push as inconsistent
authorSimon Horman <horms@verge.net.au>
Fri, 15 Nov 2013 09:10:18 +0000 (18:10 +0900)
committerBen Pfaff <blp@nicira.com>
Fri, 15 Nov 2013 17:39:53 +0000 (09:39 -0800)
commit94baabf754dde243e4cf5b7d0bfd9ca8def114ab
tree871f6233316119681bcefd52671dad4c50e5bd13
parentc2c28dfd68eeb4744edb1375eae6ccc74201e812
ofp-actions: Consider L4 actions after mpls_push as inconsistent

After an mpls_push action the resulting packet is MPLS and
the MPLS payload is opaque. Thus nothing can be assumed
about the packets network protocol and it is inconsistent
to apply L4 actions.

With regards to actions that affect the packet at other layers
of the protocol stack:

* L3: The consistency of L3 actions should already be handled correctly
  by virtue of the dl_type of the flow being temporarily altered
  during consistency checking by both push_mpls and pop_mpls actions.

* MPLS: The consistency checking of MPLS actions appear to already be
  handled correctly.

* VLAN: At this time Open vSwitch on mpls_push an MPLS LSE is always
  added after any VLAN tags that follow the ethernet header.
  That is the tag ordering defined prior to OpenFlow1.3. As such
  VLAN actions should sill be equally valid before and after mpls_push
  and mpls_pop actions.

* L2 actions are equally valid before and after mpls_push and mpls_pop actions.

Acked-by: 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
tests/ofp-actions.at