aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2014-06-16 16:47:11 +0100
committerMichael Tokarev <mjt@tls.msk.ru>2014-07-18 17:45:36 +0400
commitb739ef05dbaffcaade5e756a70f91cdf9c327154 (patch)
tree9c84251b0460348ce9d35c359a98429f4496ee19 /net
parent4d121a549869b93475ccf8b9a0d3e693011d1abb (diff)
downloadqemu-b739ef05dbaffcaade5e756a70f91cdf9c327154.zip
qemu-b739ef05dbaffcaade5e756a70f91cdf9c327154.tar.gz
qemu-b739ef05dbaffcaade5e756a70f91cdf9c327154.tar.bz2
slirp: Give error message if hostfwd_add/remove for unrecognized vlan/stack
If the user specified a (vlan ID, slirp stack name) tuple in a monitor hostfwd_add/remove command and we can't find it, give the user an error message rather than silently doing nothing. This brings this error case in slirp_lookup() into line with the other two. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'net')
-rw-r--r--net/slirp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/slirp.c b/net/slirp.c
index 8fddc03..647039e 100644
--- a/net/slirp.c
+++ b/net/slirp.c
@@ -282,6 +282,7 @@ static SlirpState *slirp_lookup(Monitor *mon, const char *vlan,
NetClientState *nc;
nc = net_hub_find_client_by_name(strtol(vlan, NULL, 0), stack);
if (!nc) {
+ monitor_printf(mon, "unrecognized (vlan-id, stackname) pair\n");
return NULL;
}
if (strcmp(nc->model, "user")) {