2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +00:00

dpif-netdev: Fix validation of VLAN PCP value in userspace datapath.

Reported-by: Jean Tourrilhes <jt@hpl.hp.com>
This commit is contained in:
Ben Pfaff
2010-02-11 13:51:56 -08:00
parent da0603cf27
commit 33ce24ed46
2 changed files with 4 additions and 1 deletions

View File

@@ -752,7 +752,7 @@ dpif_netdev_validate_actions(const union odp_action *actions, int n_actions,
case ODPAT_SET_VLAN_PCP:
*mutates = true;
if (a->vlan_pcp.vlan_pcp & ~VLAN_PCP_MASK) {
if (a->vlan_pcp.vlan_pcp & ~(VLAN_PCP_MASK >> VLAN_PCP_SHIFT)) {
return EINVAL;
}
break;