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.
* xxx version. We'll directly use the software version
* xxx until the problem can be diagnosed.
*/
- skb = __vlan_put_tag(skb, tci);
+ skb = __vlan_put_tag(skb, tci & mask);
if (!skb)
return NULL;
vh = vlan_eth_hdr(skb);