vswitch: Fix OFMP alignment problem on 64-bit systems.
authorJustin Pettit <jpettit@nicira.com>
Fri, 5 Jun 2009 21:50:08 +0000 (14:50 -0700)
committerJustin Pettit <jpettit@nicira.com>
Fri, 5 Jun 2009 21:59:36 +0000 (14:59 -0700)
One of the OpenFlow managment protocol's UUID TLV messages had a problem
building on 64-bit systems.  By extending the structure length by 4
bytes, the problem goes away.

include/openflow/openflow-mgmt.h

index a94e224..1ff3ba9 100644 (file)
@@ -114,8 +114,9 @@ struct ofmptsr_mgmt_uuid {
     uint8_t pad[4];
     uint64_t mgmt_id;                     /* Management ID. */
     uint8_t uuid[OFMP_UUID_LEN];          /* Null-terminated name. */
+    uint8_t pad2[4];                      /* Pad for 64-bit systems. */
 };
-OFP_ASSERT(sizeof(struct ofmptsr_mgmt_uuid) == 52);
+OFP_ASSERT(sizeof(struct ofmptsr_mgmt_uuid) == 56);
 
 /* TLV types for switch resource descriptions. */
 enum ofmp_switch_resources {