From f8704c4470f1afaff800d8f41deabded73dfbb4b Mon Sep 17 00:00:00 2001 From: Justin Pettit Date: Tue, 6 May 2008 22:11:06 -0700 Subject: [PATCH] Mark the "vlan_eth_header" struct as packed, because it's getting padded on some architectures. -- Reported by GigaFin -- --- include/packets.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.30.2