ofp-util: Fix validation of OFPAT_SET_VLAN_PCP actions.
authorBen Pfaff <blp@nicira.com>
Wed, 4 May 2011 22:47:27 +0000 (15:47 -0700)
committerBen Pfaff <blp@nicira.com>
Wed, 4 May 2011 22:47:27 +0000 (15:47 -0700)
Found by sparse.

lib/ofp-util.c

index 5aa2b825e1142d0147ff461d291c42057dbce502..ddac77270e1b60c80ef7123d767f26121914cc02 100644 (file)
@@ -1922,7 +1922,7 @@ check_action(const union ofp_action *a, unsigned int len,
         if (error) {
             return error;
         }
-        if (a->vlan_vid.vlan_vid & ~7) {
+        if (a->vlan_pcp.vlan_pcp & ~7) {
             return ofp_mkerr(OFPET_BAD_ACTION, OFPBAC_BAD_ARGUMENT);
         }
         return 0;