aboutsummaryrefslogtreecommitdiff
path: root/nbd/server.c
diff options
context:
space:
mode:
Diffstat (limited to 'nbd/server.c')
-rw-r--r--nbd/server.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/nbd/server.c b/nbd/server.c
index 6d9c15a0b0..2a4dd10f52 100644
--- a/nbd/server.c
+++ b/nbd/server.c
@@ -483,9 +483,12 @@ static int nbd_negotiate_options(NBDClient *client)
return -EINVAL;
default:
TRACE("Unsupported option 0x%x", clientflags);
+ if (nbd_negotiate_drop_sync(client->ioc, length) != length) {
+ return -EIO;
+ }
nbd_negotiate_send_rep(client->ioc, NBD_REP_ERR_UNSUP,
clientflags);
- return -EINVAL;
+ break;
}
} else {
/*