diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2014-06-16 15:10:44 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2014-06-23 16:05:10 +0100 |
commit | 507378e2cf875851bf7e3d9902927fa27a18b0f1 (patch) | |
tree | 68516239d7aaef7590a263bf0a4fdc5ebfaf66de | |
parent | f1cfb27291b22bbc3611711ff9e763c74d93c25c (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.c | 1 |
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")) { |