Message ID | 1459967330-4573-4-git-send-email-mreitz@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/block/nbd.c b/block/nbd.c index d9b946f..2112ec0 100644 --- a/block/nbd.c +++ b/block/nbd.c @@ -201,6 +201,10 @@ static SocketAddress *nbd_config(BDRVNBDState *s, QDict *options, char **export, } return NULL; } + if (qdict_haskey(options, "port") && !qdict_haskey(options, "host")) { + error_setg(errp, "port may not be used without host"); + return NULL; + } saddr = g_new0(SocketAddress, 1);