ofproto: Update flow context for resubmit on VLAN actions
authorJustin Pettit <jpettit@nicira.com>
Tue, 12 Oct 2010 07:01:37 +0000 (00:01 -0700)
committerJustin Pettit <jpettit@nicira.com>
Tue, 12 Oct 2010 07:07:04 +0000 (00:07 -0700)
Any modifications that happen to the packet are supposed to be reflected
in the flow context for a resubmitted lookup.  Commit 26233b (datapath:
Combine dl_vlan and dl_vlan_pcp.) broke this for OFPAT_SET_VLAN_VID and
OFPAT_SET_VLAN_PCP.  This corrects that behavior.

Bug #3808 (2/2)

ofproto/ofproto.c

index 341d403..e25ce28 100644 (file)
@@ -2760,6 +2760,7 @@ do_xlate_actions(const union ofp_action *in, size_t n_in,
             oa = odp_actions_add(ctx->out, ODPAT_SET_DL_TCI);
             oa->dl_tci.tci = ia->vlan_vid.vlan_vid & htons(VLAN_VID_MASK);
             oa->dl_tci.mask = htons(VLAN_VID_MASK);
+            ctx->flow.dl_vlan = ia->vlan_vid.vlan_vid;
             break;
 
         case OFPAT_SET_VLAN_PCP:
@@ -2767,6 +2768,7 @@ do_xlate_actions(const union ofp_action *in, size_t n_in,
             oa->dl_tci.tci = htons((ia->vlan_pcp.vlan_pcp << VLAN_PCP_SHIFT)
                                    & VLAN_PCP_MASK);
             oa->dl_tci.mask = htons(VLAN_PCP_MASK);
+            ctx->flow.dl_vlan_pcp = ia->vlan_pcp.vlan_pcp;
             break;
 
         case OFPAT_STRIP_VLAN: