From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33621) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eYbEd-00083N-1c for qemu-devel@nongnu.org; Mon, 08 Jan 2018 12:29:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eYbEc-0008Pm-7r for qemu-devel@nongnu.org; Mon, 08 Jan 2018 12:29:19 -0500 Received: from mail-qk0-x241.google.com ([2607:f8b0:400d:c09::241]:46339) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eYbEc-0008PE-3j for qemu-devel@nongnu.org; Mon, 08 Jan 2018 12:29:18 -0500 Received: by mail-qk0-x241.google.com with SMTP id l12so14750630qke.13 for ; Mon, 08 Jan 2018 09:29:18 -0800 (PST) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Mon, 8 Jan 2018 14:28:54 -0300 Message-Id: <20180108172904.8772-3-f4bug@amsat.org> In-Reply-To: <20180108172904.8772-1-f4bug@amsat.org> References: <20180108172904.8772-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH 02/12] slirp: struct icmp/ethhdr ARE packed List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Samuel Thibault , Jan Kiszka , "Michael S . Tsirkin" , Paolo Bonzini , Eric Blake , Thomas Huth Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org Signed-off-by: Philippe Mathieu-Daudé --- slirp/ip6_icmp.h | 6 +++--- slirp/ip_icmp.h | 2 +- slirp/slirp.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/slirp/ip6_icmp.h b/slirp/ip6_icmp.h index b3378b17b5..a4ccc69974 100644 --- a/slirp/ip6_icmp.h +++ b/slirp/ip6_icmp.h @@ -17,20 +17,20 @@ struct icmp6_echo { /* Echo Messages */ uint16_t id; uint16_t seq_num; -}; +} QEMU_PACKED; union icmp6_error_body { uint32_t unused; uint32_t pointer; uint32_t mtu; -}; +} QEMU_PACKED; /* * NDP Messages */ struct ndp_rs { /* Router Solicitation Message */ uint32_t reserved; -}; +} QEMU_PACKED; struct ndp_ra { /* Router Advertisement Message */ uint8_t chl; /* Cur Hop Limit */ diff --git a/slirp/ip_icmp.h b/slirp/ip_icmp.h index d88ab34c1b..e53242bdd8 100644 --- a/slirp/ip_icmp.h +++ b/slirp/ip_icmp.h @@ -88,7 +88,7 @@ struct icmp { #define icmp_ip icmp_dun.id_ip.idi_ip #define icmp_mask icmp_dun.id_mask #define icmp_data icmp_dun.id_data -}; +} QEMU_PACKED; /* * Lower bounds on packet lengths for various types. diff --git a/slirp/slirp.h b/slirp/slirp.h index 9f29b52610..9a7287e7cc 100644 --- a/slirp/slirp.h +++ b/slirp/slirp.h @@ -103,7 +103,7 @@ struct ethhdr { unsigned char h_dest[ETH_ALEN]; /* destination eth addr */ unsigned char h_source[ETH_ALEN]; /* source ether addr */ unsigned short h_proto; /* packet type ID field */ -}; +} QEMU_PACKED; struct slirp_arphdr { unsigned short ar_hrd; /* format of hardware address */ -- 2.15.1