2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

ofp-errors: Correctly encode errors as extensions or not depending on domain.

When ofp-errors was introduced, each OFPERR_* was either an extension or
not.  However, since then, some Nicira extension error code have been
given official error codes in later OpenFlow versions, so now whether an
OFPERR_* is an extension depends on the OpenFlow versions.  This means
that certain errors were encoded incorrectly as extensions in later
OpenFlow versions.  This commit fixes the problem.

This commit also adds a test that should prevent a regression.

Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
Ben Pfaff
2012-11-30 14:18:03 -08:00
parent 1554987853
commit edd70aa771
4 changed files with 58 additions and 13 deletions

View File

@@ -583,7 +583,6 @@ const char *ofperr_domain_get_name(enum ofp_version);
bool ofperr_is_valid(enum ofperr);
bool ofperr_is_category(enum ofperr);
bool ofperr_is_nx_extension(enum ofperr);
bool ofperr_is_encodable(enum ofperr, enum ofp_version);
enum ofperr ofperr_decode(enum ofp_version, uint16_t type, uint16_t code);