aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2014-06-16 15:10:44 +0100
committerPeter Maydell <peter.maydell@linaro.org>2014-06-23 16:05:10 +0100
commit507378e2cf875851bf7e3d9902927fa27a18b0f1 (patch)
tree68516239d7aaef7590a263bf0a4fdc5ebfaf66de
parentf1cfb27291b22bbc3611711ff9e763c74d93c25c (diff)
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>
-rw-r--r--net/slirp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/slirp.c b/net/slirp.c
index 8fddc03841..647039ec39 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")) {