Skip to content

Commit

Permalink
ofp-msgs: Fix definitions of OF1.4 OFPT_GET_ASYNC_REPLY and OFPT_SET_…
Browse files Browse the repository at this point in the history
…ASYNC.

The structures declared in ofp-msgs.h for messages definitions should not
include an OpenFlow header (its presence is implied), but the definition of
these messages did.  This commit fixes the definitions.

The visible bug was really minor here: messages of these kinds without any
TLVs would be rejected by the OpenFlow parser.  But OVS never sends these
messages without TLVs, so probably no one ever noticed this.  (Also, the
OVS support for OF1.4 is still incomplete and experimental.)

Signed-off-by: Ben Pfaff <[email protected]>
Acked-by: Jarno Rajahalme <[email protected]>
  • Loading branch information
blp committed Jan 20, 2016
1 parent 33fa5fe commit afe8a6c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
11 changes: 0 additions & 11 deletions include/openflow/openflow-1.4.h
Original file line number Diff line number Diff line change
Expand Up @@ -245,17 +245,6 @@ struct ofp14_async_config_prop_header {
ovs_be16 length; /* Length in bytes of this property. */
};
OFP_ASSERT(sizeof(struct ofp14_async_config_prop_header) == 4);

/* Asynchronous message configuration.
* OFPT_GET_ASYNC_REPLY or OFPT_SET_ASYNC.
*/
struct ofp14_async_config {
struct ofp_header header;
/* Async config Property list - 0 or more */
struct ofp14_async_config_prop_header properties[0];
};
OFP_ASSERT(sizeof(struct ofp14_async_config) == 8);

/* Request forward reason */
enum ofp14_requestforward_reason {
OFPRFR_GROUP_MOD = 0, /* Forward group mod requests. */
Expand Down
6 changes: 3 additions & 3 deletions lib/ofp-msgs.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2013, 2014, 2015 Nicira, Inc.
* Copyright (c) 2012, 2013, 2014, 2015, 2016 Nicira, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -232,13 +232,13 @@ enum ofpraw {
OFPRAW_OFPT14_GET_ASYNC_REQUEST,
/* OFPT 1.3 (27): struct ofp13_async_config. */
OFPRAW_OFPT13_GET_ASYNC_REPLY,
/* OFPT 1.4+ (27): struct ofp14_async_config, uint8_t[8][]. */
/* OFPT 1.4+ (27): uint8_t[8][]. */
OFPRAW_OFPT14_GET_ASYNC_REPLY,
/* OFPT 1.3 (28): struct ofp13_async_config. */
OFPRAW_OFPT13_SET_ASYNC,
/* NXT 1.0+ (19): struct nx_async_config. */
OFPRAW_NXT_SET_ASYNC_CONFIG,
/* OFPT 1.4+ (28): struct ofp14_async_config, uint8_t[8][]. */
/* OFPT 1.4+ (28): uint8_t[8][]. */
OFPRAW_OFPT14_SET_ASYNC,

/* OFPT 1.3+ (29): struct ofp13_meter_mod, uint8_t[8][]. */
Expand Down

0 comments on commit afe8a6c

Please sign in to comment.