From 24016f5a45e873dd83feb41c0ca255377a6902d2 Mon Sep 17 00:00:00 2001 From: Isaku Yamahata Date: Wed, 27 Jun 2012 13:26:57 +0900 Subject: [PATCH] lib/meta-flow: use symbolic value instead of ~7 mf_is_value_valid() use symbolic value instead of 7 for vlan pcp Signed-off-by: Isaku Yamahata Signed-off-by: Ben Pfaff --- lib/meta-flow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/meta-flow.c b/lib/meta-flow.c index b3a4bffa..719c0d94 100644 --- a/lib/meta-flow.c +++ b/lib/meta-flow.c @@ -968,7 +968,7 @@ mf_is_value_valid(const struct mf_field *mf, const union mf_value *value) return !(value->be16 & htons(VLAN_CFI | VLAN_PCP_MASK)); case MFF_VLAN_PCP: - return !(value->u8 & ~7); + return !(value->u8 & ~(VLAN_PCP_MASK >> VLAN_PCP_SHIFT)); case MFF_IPV6_LABEL: return !(value->be32 & ~htonl(IPV6_LABEL_MASK)); -- 2.30.2