qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] slirp: Give error message if hostfwd_add/remove for unrecognized vlan/stack
@ 2014-06-16 15:47 Peter Maydell
  2014-06-26 12:35 ` Peter Maydell
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Maydell @ 2014-06-16 15:47 UTC (permalink / raw)
  To: qemu-devel; +Cc: Jan Kiszka, patches

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>
---
 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")) {
-- 
1.9.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] slirp: Give error message if hostfwd_add/remove for unrecognized vlan/stack
  2014-06-16 15:47 [Qemu-devel] [PATCH] slirp: Give error message if hostfwd_add/remove for unrecognized vlan/stack Peter Maydell
@ 2014-06-26 12:35 ` Peter Maydell
  2014-07-08 11:39   ` Peter Maydell
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Maydell @ 2014-06-26 12:35 UTC (permalink / raw)
  To: QEMU Developers; +Cc: QEMU Trivial, Jan Kiszka, Patch Tracking

On 16 June 2014 16:47, Peter Maydell <peter.maydell@linaro.org> 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 <peter.maydell@linaro.org>
> ---
>  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")) {
> --
> 1.9.2

Ping! (and cc trivial).

thanks
-- PMM

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] slirp: Give error message if hostfwd_add/remove for unrecognized vlan/stack
  2014-06-26 12:35 ` Peter Maydell
@ 2014-07-08 11:39   ` Peter Maydell
  2014-07-18  5:22     ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Maydell @ 2014-07-08 11:39 UTC (permalink / raw)
  To: QEMU Developers; +Cc: QEMU Trivial, Jan Kiszka, Patch Tracking

On 26 June 2014 13:35, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 16 June 2014 16:47, Peter Maydell <peter.maydell@linaro.org> 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 <peter.maydell@linaro.org>
>> ---
>>  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")) {
>> --
>> 1.9.2
>
> Ping! (and cc trivial).

Ping again...

thanks
-- PMM

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [Qemu-trivial] [PATCH] slirp: Give error message if hostfwd_add/remove for unrecognized vlan/stack
  2014-07-08 11:39   ` Peter Maydell
@ 2014-07-18  5:22     ` Michael Tokarev
  2014-07-18  7:13       ` Peter Maydell
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Tokarev @ 2014-07-18  5:22 UTC (permalink / raw)
  To: Peter Maydell, QEMU Developers; +Cc: QEMU Trivial, Jan Kiszka, Patch Tracking

08.07.2014 15:39, Peter Maydell wrote:
> On 26 June 2014 13:35, Peter Maydell <peter.maydell@linaro.org> wrote:
>> On 16 June 2014 16:47, Peter Maydell <peter.maydell@linaro.org> 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 <peter.maydell@linaro.org>
>>> ---
>>>  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 <mjt@tls.msk.ru>

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [Qemu-trivial] [PATCH] slirp: Give error message if hostfwd_add/remove for unrecognized vlan/stack
  2014-07-18  5:22     ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
@ 2014-07-18  7:13       ` Peter Maydell
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Maydell @ 2014-07-18  7:13 UTC (permalink / raw)
  To: Michael Tokarev; +Cc: QEMU Trivial, Jan Kiszka, QEMU Developers, Patch Tracking

On 18 July 2014 06:22, Michael Tokarev <mjt@tls.msk.ru> wrote:
> 08.07.2014 15:39, Peter Maydell wrote:
>> On 26 June 2014 13:35, Peter Maydell <peter.maydell@linaro.org> wrote:
>>> On 16 June 2014 16:47, Peter Maydell <peter.maydell@linaro.org> 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.

> 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.

At this point and given the slirp code has been like this for a long
time, I think it's probably best to let it go til 2.2.

thanks
-- PMM

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-07-18  7:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-16 15:47 [Qemu-devel] [PATCH] slirp: Give error message if hostfwd_add/remove for unrecognized vlan/stack Peter Maydell
2014-06-26 12:35 ` Peter Maydell
2014-07-08 11:39   ` Peter Maydell
2014-07-18  5:22     ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
2014-07-18  7:13       ` Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).