ofproto-dpif: Fix VLAN and other field handling in OFPP_NORMAL.
authorBen Pfaff <blp@nicira.com>
Thu, 13 Oct 2011 19:16:34 +0000 (12:16 -0700)
committerBen Pfaff <blp@nicira.com>
Mon, 31 Oct 2011 16:59:39 +0000 (09:59 -0700)
commit267cee702a1bb8041b06a18bb3bc9555882fde80
tree8d11aa23bf50197167157b990c0f63ce09f2d388
parentb9a3e6426a388c0b136b2f19cc21dcdf8b27a8ec
ofproto-dpif: Fix VLAN and other field handling in OFPP_NORMAL.

This is a nontrivial cross-port of commit 823518f1f "ofproto-dpif: Fix VLAN
and other field handling in OFPP_NORMAL" from the "master" branch.

compose_actions(), which is part of the OFPP_NORMAL implementation, had
multiple flaws that this commit corrects.

First, it did not commit changes made to the flow by actions preceding the
output to OFPP_NORMAL.  This means that, for example, if an OpenFlow action
to modify an L2 or L3 header preceded the output to OFPP_NORMAL, then
OFPP_NORMAL would output its packets without those changes.

Second, it did not update the action_xlate_ctx's notion of the VLAN that
was currently set, in the cases where it modified the current VLAN.  This
means that actions following the output to OFPP_NORMAL could output to
unexpected VLANs.

Bug #6001.
Reported-by: Michael Mao <mmao@nicira.com>
ofproto/ofproto-dpif.c