From 010c6bd029d091d5224027a67da993bf64f5c998 Mon Sep 17 00:00:00 2001 From: Justin Pettit Date: Fri, 5 Jun 2009 14:50:08 -0700 Subject: [PATCH] vswitch: Fix OFMP alignment problem on 64-bit systems. 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/openflow/openflow-mgmt.h b/include/openflow/openflow-mgmt.h index a94e2244..1ff3ba9a 100644 --- a/include/openflow/openflow-mgmt.h +++ b/include/openflow/openflow-mgmt.h @@ -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 { -- 2.30.2