aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2011-04-29 15:47:26 -0700
committerBen Pfaff <blp@nicira.com>2011-06-02 09:23:38 -0700
commit58961017ea07ff1ee4f8ad520bd0e35493a7a06f (patch)
tree07a08b926882ee9fa49ad453f25a7385a35c5adc /lib
parente8ee90d2b5a025c0d155af652d18c8a20af4ccc0 (diff)
ofp-util: Don't warn for different forms of nw_{src,dst} wildcards.
OpenFlow 1.0 uses a 6-bit field to express the number of wildcarded bits in the nw_src and nw_dst field. Any value 32 or greater in these fields (binary 1xxxxx) means that all of the bits are wildcarded. That means that there are 32 different ways to express a wildcarded nw_src or nw_dst. At least two of those seem sensible (100000 and 111111) so we shouldn't warn about one of them. This fixes the problem by ORing with 100000 instead of 111111, so that any already-correct wildcarded mask won't be affected. This fix allows us to update some tests. Reviewed-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'lib')
-rw-r--r--lib/ofp-util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ofp-util.c b/lib/ofp-util.c
index d39b0bc8..101fa6b6 100644
--- a/lib/ofp-util.c
+++ b/lib/ofp-util.c
@@ -2162,7 +2162,7 @@ actions_next(struct actions_iterator *iter)
void
normalize_match(struct ofp_match *m)
{
- enum { OFPFW_NW = (OFPFW_NW_SRC_MASK | OFPFW_NW_DST_MASK | OFPFW_NW_PROTO
+ enum { OFPFW_NW = (OFPFW_NW_SRC_ALL | OFPFW_NW_DST_ALL | OFPFW_NW_PROTO
| OFPFW_NW_TOS) };
enum { OFPFW_TP = OFPFW_TP_SRC | OFPFW_TP_DST };
uint32_t wc;