]> git.ipfire.org Git - thirdparty/qemu.git/blobdiff - hmp.c
sockets: Limit SocketAddressLegacy to external interfaces
[thirdparty/qemu.git] / hmp.c
diff --git a/hmp.c b/hmp.c
index c7f161d634d2b0c06bf34bd8f787eda1364c3b3d..524e5890dee4becfd31ee432f004e006b71e92c1 100644 (file)
--- a/hmp.c
+++ b/hmp.c
@@ -34,6 +34,7 @@
 #include "qapi-visit.h"
 #include "qom/object_interfaces.h"
 #include "ui/console.h"
+#include "block/nbd.h"
 #include "block/qapi.h"
 #include "qemu-io.h"
 #include "qemu/cutils.h"
@@ -2108,7 +2109,7 @@ void hmp_nbd_server_start(Monitor *mon, const QDict *qdict)
     bool all = qdict_get_try_bool(qdict, "all", false);
     Error *local_err = NULL;
     BlockInfoList *block_list, *info;
-    SocketAddressLegacy *addr;
+    SocketAddress *addr;
 
     if (writable && !all) {
         error_setg(&local_err, "-w only valid together with -a");
@@ -2121,8 +2122,8 @@ void hmp_nbd_server_start(Monitor *mon, const QDict *qdict)
         goto exit;
     }
 
-    qmp_nbd_server_start(addr, false, NULL, &local_err);
-    qapi_free_SocketAddressLegacy(addr);
+    nbd_server_start(addr, NULL, &local_err);
+    qapi_free_SocketAddress(addr);
     if (local_err != NULL) {
         goto exit;
     }