dpif-netdev: Fix validation of VLAN PCP value in userspace datapath.
[sliver-openvswitch.git] / lib / dpif-netdev.c
index e9f006c..1daa93b 100644 (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;