2016-05-19 11:18:38 +00:00
|
|
|
From e5a945ea1e759e6441773c1e7663a1ac2492c8e4 Mon Sep 17 00:00:00 2001
|
|
|
|
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
|
|
Date: Tue, 17 May 2016 19:40:29 +0100
|
2016-05-25 10:24:16 +00:00
|
|
|
Subject: [PATCH 08/11] protocol: Pack fixed_new_option_reply struct.
|
2016-05-19 11:18:38 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|