From: Justin Pettit Date: Wed, 7 May 2008 05:11:06 +0000 (-0700) Subject: Mark the "vlan_eth_header" struct as packed, because it's getting padded on some... X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f8704c4470f1afaff800d8f41deabded73dfbb4b;p=openvswitch Mark the "vlan_eth_header" struct as packed, because it's getting padded on some architectures. -- Reported by GigaFin -- --- diff --git a/include/packets.h b/include/packets.h index ea30a2aa..b4a5f05a 100644 --- a/include/packets.h +++ b/include/packets.h @@ -120,7 +120,7 @@ struct vlan_eth_header { uint16_t veth_type; /* Always htons(ETH_TYPE_VLAN). */ uint16_t veth_tci; /* Lowest 12 bits are VLAN ID. */ uint16_t veth_next_type; -}; +} __attribute__((packed)); BUILD_ASSERT_DECL(VLAN_ETH_HEADER_LEN == sizeof(struct vlan_eth_header)); #define IP_FMT "%"PRIu8".%"PRIu8".%"PRIu8".%"PRIu8