From e5a945ea1e759e6441773c1e7663a1ac2492c8e4 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 17 May 2016 19:40:29 +0100 Subject: [PATCH 08/10] protocol: Pack fixed_new_option_reply struct. This struct was not packed, but we were sending a reply by sending the struct directly onto the wire. I think we got away with it, but not good. --- src/protocol.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/protocol.h b/src/protocol.h index fcbc145..de511a6 100644 --- a/src/protocol.h +++ b/src/protocol.h @@ -72,7 +72,7 @@ struct fixed_new_option_reply { uint32_t reply; /* NBD_REP_* */ uint32_t replylen; /* we always send zero at the moment */ /* reply data follows, but we currently never send any */ -}; +} __attribute__((packed)); #define NEW_OPTION_REPLY UINT64_C(0x3e889045565a9) -- 2.7.4