diff options
Diffstat (limited to 'net/net.c')
-rw-r--r-- | net/net.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -1134,6 +1134,11 @@ void netdev_add(QemuOpts *opts, Error **errp) void qmp_netdev_add(Netdev *netdev, Error **errp) { + if (!id_wellformed(netdev->id)) { + error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "id", "an identifier"); + return; + } + net_client_init1(netdev, true, errp); } |