[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-trivial] [Qemu-devel] [PATCH] slirp: Give error message if hos
From: |
Michael Tokarev |
Subject: |
Re: [Qemu-trivial] [Qemu-devel] [PATCH] slirp: Give error message if hostfwd_add/remove for unrecognized vlan/stack |
Date: |
Fri, 18 Jul 2014 09:22:21 +0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.6.0 |
08.07.2014 15:39, Peter Maydell wrote:
> On 26 June 2014 13:35, Peter Maydell <address@hidden> wrote:
>> On 16 June 2014 16:47, Peter Maydell <address@hidden> wrote:
>>> 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 <address@hidden>
>>> ---
>>> net/slirp.c | 1 +
>>> 1 file changed, 1 insertion(+)
>>>
>>> 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")) {
Reviewed-by: Michael Tokarev <address@hidden>
Peter, I returned from vacation yesterday, so I weren't able to process -trivial
queue before, and due to the time constraints we have before 2.1, I'm not sure
it is a good idea to make a pull request for the -trivial tree. I'll pick this
one up but it might be better to apply this directly.
Thanks,
/mjt