ofp-parse: Fix invalid memory use.
[openvswitch] / include / openflow / nicira-ext.h
index 7ee2c44b68de82ce3edcf30c5457b56401c84e14..d73f3ba82a58b2b4682b139b909d60e28bf3491d 100644 (file)
@@ -154,10 +154,7 @@ enum nicira_type {
 
 /* Header for Nicira vendor stats request and reply messages. */
 struct nicira_stats_msg {
-    struct ofp_header header;   /* OFPT_STATS_REQUEST or OFPT_STATS_REPLY. */
-    ovs_be16 type;              /* OFPST_VENDOR. */
-    ovs_be16 flags;             /* OFPSF_{REQ,REPLY}_*. */
-    ovs_be32 vendor;            /* NX_VENDOR_ID. */
+    struct ofp_vendor_stats_msg vsm; /* Vendor NX_VENDOR_ID. */
     ovs_be32 subtype;           /* One of NXST_* below. */
     uint8_t pad[4];             /* Align to 64-bits. */
 };
@@ -658,7 +655,7 @@ struct nx_action_autopath {
     ovs_be16 type;              /* OFPAT_VENDOR. */
     ovs_be16 len;               /* Length is 20. */
     ovs_be32 vendor;            /* NX_VENDOR_ID. */
-    ovs_be16 subtype;           /* NXAST_MULTIPATH. */
+    ovs_be16 subtype;           /* NXAST_AUTOPATH. */
 
     /* Where to store the result. */
     ovs_be16 ofs_nbits;         /* (ofs << 6) | (n_bits - 1). */
@@ -1274,8 +1271,8 @@ struct nx_flow_stats {
     ovs_be16 match_len;       /* Length of nx_match. */
     uint8_t pad2[4];          /* Align to 64 bits. */
     ovs_be64 cookie;          /* Opaque controller-issued identifier. */
-    ovs_be64 packet_count;    /* Number of packets in flow. */
-    ovs_be64 byte_count;      /* Number of bytes in flow. */
+    ovs_be64 packet_count;    /* Number of packets, UINT64_MAX if unknown. */
+    ovs_be64 byte_count;      /* Number of bytes, UINT64_MAX if unknown. */
     /* Followed by:
      *   - Exactly match_len (possibly 0) bytes containing the nx_match, then
      *   - Exactly (match_len + 7)/8*8 - match_len (between 0 and 7) bytes of
@@ -1310,10 +1307,10 @@ OFP_ASSERT(sizeof(struct nx_aggregate_stats_request) == 32);
  * OFPST_AGGREGATE reply). */
 struct nx_aggregate_stats_reply {
     struct nicira_stats_msg nsm;
-    ovs_be64 packet_count;         /* Number of packets in flows. */
-    ovs_be64 byte_count;           /* Number of bytes in flows. */
-    ovs_be32 flow_count;           /* Number of flows. */
-    uint8_t pad[4];                /* Align to 64 bits. */
+    ovs_be64 packet_count;     /* Number of packets, UINT64_MAX if unknown. */
+    ovs_be64 byte_count;       /* Number of bytes, UINT64_MAX if unknown. */
+    ovs_be32 flow_count;       /* Number of flows. */
+    uint8_t pad[4];            /* Align to 64 bits. */
 };
 OFP_ASSERT(sizeof(struct nx_aggregate_stats_reply) == 48);