ofp-errors: Fix bugs in treatment of OpenFlow experimenter errors.
authorBen Pfaff <blp@nicira.com>
Thu, 21 Aug 2014 17:38:15 +0000 (10:38 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 4 Sep 2014 19:31:00 +0000 (12:31 -0700)
commitd12f128a31210ed936820cea68c2f42c07ead5cf
tree23239ff4d137909339f06762814497638c957e1e
parenta678b23e666049866dc54ca6e8ecd643e145bf96
ofp-errors: Fix bugs in treatment of OpenFlow experimenter errors.

OpenFlow 1.2 and later have "experimenter errors".  The OVS implementation
was buggy in a few ways.  First, a bug in extract-ofp-errors prevented
OF1.2+ experimenter errors from being properly decoded.  Second,
OF1.2+ experimenter errors have only a type, not a code, whereas all other
types of errors (standard errors, OF1.0/1.1 Nicira extension errors) have
both, but extract-ofp-errors didn't properly enforce that.

This commit fixes both problems and improves existing tests to verify that
encoding and decoding of experimenter errors now works properly.

This commit also fixes the definition of OFPBIC_DUP_INST.  It claimed to
have an OF1.1 experimenter error value although OF1.1 didn't have
experimenter errors.  This commit changes it to use a Nicira extension
error in OF1.1 instead.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
build-aux/extract-ofp-errors
lib/ofp-errors.h
tests/ofp-errors.at