ofproto: Fix byte order for OFP_VLAN_NONE to dl_vlan in struct flow.
authorBen Pfaff <blp@nicira.com>
Thu, 20 May 2010 22:43:13 +0000 (15:43 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 17 Jun 2010 17:30:18 +0000 (10:30 -0700)
This is not a bug, since OFP_VLAN_NONE is all-1-bits, but it is still
best to get it correct.

ofproto/ofproto.c

index 050b4df1a961be4b6865bde485a3ec4a0008c647..aaf4ad6ee642beb969d18fd045c3fae184b04706 100644 (file)
@@ -2490,7 +2490,7 @@ do_xlate_actions(const union ofp_action *in, size_t n_in,
 
         case OFPAT_STRIP_VLAN:
             odp_actions_add(ctx->out, ODPAT_STRIP_VLAN);
-            ctx->flow.dl_vlan = OFP_VLAN_NONE;
+            ctx->flow.dl_vlan = htons(OFP_VLAN_NONE);
             ctx->flow.dl_vlan_pcp = 0;
             break;