From: Justin Pettit Date: Fri, 5 Jun 2009 21:50:08 +0000 (-0700) Subject: vswitch: Fix OFMP alignment problem on 64-bit systems. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=010c6bd029d091d5224027a67da993bf64f5c998;p=openvswitch 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. --- 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 {