datapath: Set only VID when adding a new header with ODPAT_SET_VLAN_VID.
authorBen Pfaff <blp@nicira.com>
Wed, 15 Apr 2009 17:50:08 +0000 (10:50 -0700)
committerBen Pfaff <blp@nicira.com>
Wed, 15 Apr 2009 17:50:08 +0000 (10:50 -0700)
commit32c60c27ac0665bea6da7974550cf6db3f19ce0f
treeefb7244260f7a73ebf385b95d1b83d222afdb5a8
parentb96193cded7a3de731670cd40e9d5b03ae5a682d
datapath: Set only VID when adding a new header with ODPAT_SET_VLAN_VID.

ODPAT_SET_VLAN_VID is supposed to set only the VID field of the VLAN
header.  When it was only modifying an existing VLAN header, it was doing
this correctly.  However, when it added a new header, it added all of the
bits passed in as the argument, not just the VID field.  Fix this, setting
the other bits to 0 implicitly.

Also fixes the analogous problem with ODPAT_SET_VLAN_PCP.
datapath/actions.c