Add another upstream patch since 1.1.11.
This commit is contained in:
parent
552e5b3c73
commit
a85c67bc96
@ -1,7 +1,7 @@
|
||||
From 5294b7d8cc011f8b5e068aad744f612df7414a82 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Sat, 31 Oct 2015 13:24:52 +0000
|
||||
Subject: [PATCH 01/10] Add mandir to --dump-config output.
|
||||
Subject: [PATCH 01/11] Add mandir to --dump-config output.
|
||||
|
||||
This is useful for external plugins that want to install
|
||||
a man page.
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 4b562134c3dad1a84aa92c1658e72046569e1570 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Mon, 11 Jan 2016 15:34:57 +0000
|
||||
Subject: [PATCH 02/10] Update TODO.
|
||||
Subject: [PATCH 02/11] Update TODO.
|
||||
|
||||
---
|
||||
TODO | 5 +++++
|
||||
|
@ -1,7 +1,7 @@
|
||||
From f93807114634d58ca2ef0d64f7637ebd87e48a50 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Mon, 11 Jan 2016 17:08:51 +0000
|
||||
Subject: [PATCH 03/10] Add support for newstyle NBD protocol (RHBZ#1297100).
|
||||
Subject: [PATCH 03/11] Add support for newstyle NBD protocol (RHBZ#1297100).
|
||||
|
||||
---
|
||||
.gitignore | 1 +
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 0759d15aa3649d088eeae91fcd174d0b37e1ccde Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Mon, 11 Jan 2016 19:02:53 +0000
|
||||
Subject: [PATCH 04/10] xz: Fix various printf warnings on 32 bit.
|
||||
Subject: [PATCH 04/11] xz: Fix various printf warnings on 32 bit.
|
||||
|
||||
xzfile.c: In function 'xzfile_read_block':
|
||||
xzfile.c:456:19: warning: format '%zu' expects argument of type 'size_t', but argument 2 has type 'uint64_t {aka long long unsigned int}' [-Wformat=]
|
||||
|
@ -1,7 +1,7 @@
|
||||
From b6db2f65596470492f0ad76d1ed63ddb98b17167 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Mon, 11 Jan 2016 19:46:37 +0000
|
||||
Subject: [PATCH 05/10] ocaml: Avoid race when building NBDKit.cmi.
|
||||
Subject: [PATCH 05/11] ocaml: Avoid race when building NBDKit.cmi.
|
||||
|
||||
If both the NBDKit.cmi and NBDKit.cmx builds run in parallel, both
|
||||
will try to build NBDKit.cmi, resulting in a corrupt NBDKit.cmi file.
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 1c359d1140fee575cf478e2b4bf0c5ca0af9d05e Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Mon, 11 Jan 2016 20:34:28 +0000
|
||||
Subject: [PATCH 06/10] Test the -o (oldstyle) command line option.
|
||||
Subject: [PATCH 06/11] Test the -o (oldstyle) command line option.
|
||||
|
||||
---
|
||||
.gitignore | 1 +
|
||||
|
@ -1,7 +1,7 @@
|
||||
From f141228d1b6baddadcd516137d76b3d852af8cde Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Tue, 12 Jan 2016 12:16:48 +0000
|
||||
Subject: [PATCH 07/10] protocol: Send limited range of errno values to the
|
||||
Subject: [PATCH 07/11] protocol: Send limited range of errno values to the
|
||||
client.
|
||||
|
||||
See the proposal here:
|
||||
|
@ -1,7 +1,7 @@
|
||||
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
|
||||
Subject: [PATCH 08/10] protocol: Pack fixed_new_option_reply struct.
|
||||
Subject: [PATCH 08/11] 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.
|
||||
|
@ -1,7 +1,7 @@
|
||||
From f989fbad9b0527925c38f4350190cb1536a4d8c2 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Tue, 17 May 2016 19:42:35 +0100
|
||||
Subject: [PATCH 09/10] protocol: Rename NEW_OPTION_REPLY as NBD_REP_MAGIC.
|
||||
Subject: [PATCH 09/11] protocol: Rename NEW_OPTION_REPLY as NBD_REP_MAGIC.
|
||||
|
||||
To be consistent with qemu's implementation.
|
||||
---
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 0095b003b56894baad8e6789d523cf3c51905c05 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Tue, 17 May 2016 19:43:16 +0100
|
||||
Subject: [PATCH 10/10] Implement newstyle export names.
|
||||
Subject: [PATCH 10/11] Implement newstyle export names.
|
||||
|
||||
This is now required by qemu >= 2.6. See this lengthy qemu-devel
|
||||
thread for details:
|
||||
|
@ -0,0 +1,46 @@
|
||||
From 7938bbc463a694aeda888d51f1de446f23402d8f Mon Sep 17 00:00:00 2001
|
||||
From: Eric Blake <eblake@redhat.com>
|
||||
Date: Fri, 20 May 2016 08:04:05 -0600
|
||||
Subject: [PATCH 11/11] protocol: Ignore rest of option when replying with
|
||||
error
|
||||
|
||||
We must consume the payload of any option received, whether or
|
||||
not we can answer the option successfully, in order to be in
|
||||
sync for reading the next option. This is particularly true
|
||||
once clients start using NBD_OPT_GO, as long as we don't happen
|
||||
to service that option.
|
||||
|
||||
Signed-off-by: Eric Blake <eblake@redhat.com>
|
||||
---
|
||||
src/connections.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/src/connections.c b/src/connections.c
|
||||
index 0c93f35..840e315 100644
|
||||
--- a/src/connections.c
|
||||
+++ b/src/connections.c
|
||||
@@ -334,6 +334,10 @@ _negotiate_handshake_newstyle_options (struct connection *conn)
|
||||
if (send_newstyle_option_reply (conn, option, NBD_REP_ERR_INVALID)
|
||||
== -1)
|
||||
return -1;
|
||||
+ if (xread (conn->sockin, data, optlen) == -1) {
|
||||
+ nbdkit_error ("read: %m");
|
||||
+ return -1;
|
||||
+ }
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -351,6 +355,10 @@ _negotiate_handshake_newstyle_options (struct connection *conn)
|
||||
/* Unknown option. */
|
||||
if (send_newstyle_option_reply (conn, option, NBD_REP_ERR_UNSUP) == -1)
|
||||
return -1;
|
||||
+ if (xread (conn->sockin, data, optlen) == -1) {
|
||||
+ nbdkit_error ("read: %m");
|
||||
+ return -1;
|
||||
+ }
|
||||
}
|
||||
|
||||
/* Note, since it's not very clear from the protocol doc, that the
|
||||
--
|
||||
2.7.4
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
Name: nbdkit
|
||||
Version: 1.1.11
|
||||
Release: 9%{?dist}
|
||||
Release: 10%{?dist}
|
||||
Summary: NBD server
|
||||
|
||||
License: BSD
|
||||
@ -25,6 +25,7 @@ Patch0007: 0007-protocol-Send-limited-range-of-errno-values-to-the-c.patch
|
||||
Patch0008: 0008-protocol-Pack-fixed_new_option_reply-struct.patch
|
||||
Patch0009: 0009-protocol-Rename-NEW_OPTION_REPLY-as-NBD_REP_MAGIC.patch
|
||||
Patch0010: 0010-Implement-newstyle-export-names.patch
|
||||
Patch0011: 0011-protocol-Ignore-rest-of-option-when-replying-with-er.patch
|
||||
|
||||
# Because patch3 & patch5 patches Makefile.am, we need:
|
||||
BuildRequires: automake, autoconf, libtool
|
||||
@ -372,6 +373,9 @@ make check || {
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed May 25 2016 Richard W.M. Jones <rjones@redhat.com> - 1.1.11-10
|
||||
- Add another upstream patch since 1.1.11.
|
||||
|
||||
* Mon May 23 2016 Richard W.M. Jones <rjones@redhat.com> - 1.1.11-9
|
||||
- Add all patches upstream since 1.1.11 (fixes RHBZ#1336758).
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user