Use updated dl_type when checking actions that use fields
authorSimon Horman <horms@verge.net.au>
Fri, 10 May 2013 02:00:06 +0000 (11:00 +0900)
committerJesse Gross <jesse@nicira.com>
Fri, 10 May 2013 16:16:34 +0000 (09:16 -0700)
commit500d243dad40ff667710aca1d099d97c38e6a62d
treec335e7e0146342359fb496344b0aa01afc2d466d
parentbe9fa766bc98b5d245d6ace51a2baba1e78ce1c3
Use updated dl_type when checking actions that use fields

Update handling of the following actions to use the dl_type set by MPLS
push and pop actions if it differs from the original dl_type. This is
consistent with the existing checking of load actions and allows
their existing checks to enforce dl_type pre-requisites correctly.

output_reg
bundle
reg_move
stack_push
stack_pop
learn
multipath

In order to avoid the verbosity of updating the flow for each applicable
action the update is treated as a common case and performed in
ofpact_check().  This was suggested by Jesse Gross.

Cc: Jesse Gross <jesse@nicira.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Jesse Gross <jesse@nicira.com>
lib/ofp-actions.c