ofp-util: Don't warn for different forms of nw_{src,dst} wildcards.
authorBen Pfaff <blp@nicira.com>
Fri, 29 Apr 2011 22:47:26 +0000 (15:47 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 13 May 2011 21:45:52 +0000 (14:45 -0700)
commitf1f41fb6b9ad166769fedacf66aca3b0364ced29
tree310c690fb08c41c4b110f2be45978959025e3ff9
parentbc9dcfb37146e813200ffcc552365c8ec3e72ff8
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>
lib/ofp-util.c
tests/autopath.at
tests/ovs-ofctl.at