[Qemu-devel] [PATCH v2] net/slirp: fix the IPv6 prefix length error message

Stefano Garzarella posted 1 patch 6 days ago
Test asan passed
Test checkpatch passed
Test docker-mingw@fedora passed
Test docker-clang@ubuntu passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190515090805.44785-1-sgarzare@redhat.com
Maintainers: Jan Kiszka <jan.kiszka@siemens.com>, Jason Wang <jasowang@redhat.com>, Samuel Thibault <samuel.thibault@ens-lyon.org>
net/slirp.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

[Qemu-devel] [PATCH v2] net/slirp: fix the IPv6 prefix length error message

Posted by Stefano Garzarella 6 days ago
Reword and add a missing parentheses at the end of the
error message.

Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
v2:
  - Reworded the error message (Markus)
  - Added Marc-André's R-b
    I made a little change to the error message, let me now
    if I should remove yuor R-b.
---
 net/slirp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/slirp.c b/net/slirp.c
index 95934fb36d..b34cb29276 100644
--- a/net/slirp.c
+++ b/net/slirp.c
@@ -498,7 +498,8 @@ static int net_slirp_init(NetClientState *peer, const char *model,
     }
     if (vprefix6_len < 0 || vprefix6_len > 126) {
         error_setg(errp,
-                   "Invalid prefix provided (prefix len must be in range 0-126");
+                   "Invalid IPv6 prefix provided "
+                   "(IPv6 prefix length must be between 0 and 126)");
         return -1;
     }
 
-- 
2.20.1


Re: [Qemu-devel] [PATCH v2] net/slirp: fix the IPv6 prefix length error message

Posted by Jason Wang 4 days ago
On 2019/5/15 下午5:08, Stefano Garzarella wrote:
> Reword and add a missing parentheses at the end of the
> error message.
>
> Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> v2:
>    - Reworded the error message (Markus)
>    - Added Marc-André's R-b
>      I made a little change to the error message, let me now
>      if I should remove yuor R-b.
> ---
>   net/slirp.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/net/slirp.c b/net/slirp.c
> index 95934fb36d..b34cb29276 100644
> --- a/net/slirp.c
> +++ b/net/slirp.c
> @@ -498,7 +498,8 @@ static int net_slirp_init(NetClientState *peer, const char *model,
>       }
>       if (vprefix6_len < 0 || vprefix6_len > 126) {
>           error_setg(errp,
> -                   "Invalid prefix provided (prefix len must be in range 0-126");
> +                   "Invalid IPv6 prefix provided "
> +                   "(IPv6 prefix length must be between 0 and 126)");
>           return -1;
>       }
>   


Applied.

Thanks



Re: [Qemu-devel] [PATCH v2] net/slirp: fix the IPv6 prefix length error message

Posted by Markus Armbruster 6 days ago
Stefano Garzarella <sgarzare@redhat.com> writes:

> Reword and add a missing parentheses at the end of the
> error message.
>
> Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> v2:
>   - Reworded the error message (Markus)
>   - Added Marc-André's R-b
>     I made a little change to the error message, let me now
>     if I should remove yuor R-b.
> ---
>  net/slirp.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/net/slirp.c b/net/slirp.c
> index 95934fb36d..b34cb29276 100644
> --- a/net/slirp.c
> +++ b/net/slirp.c
> @@ -498,7 +498,8 @@ static int net_slirp_init(NetClientState *peer, const char *model,
>      }
>      if (vprefix6_len < 0 || vprefix6_len > 126) {
>          error_setg(errp,
> -                   "Invalid prefix provided (prefix len must be in range 0-126");
> +                   "Invalid IPv6 prefix provided "
> +                   "(IPv6 prefix length must be between 0 and 126)");
>          return -1;
>      }

"Parameter 'ipv6-prefixlen' expects a value between 0 and 126" would be
closer to how we report similar errors elsewhere.

Regardless:
Reviewed-by: Markus Armbruster <armbru@redhat.com>

Re: [Qemu-devel] [PATCH v2] net/slirp: fix the IPv6 prefix length error message

Posted by Stefano Garzarella 6 days ago
On Wed, May 15, 2019 at 02:33:03PM +0200, Markus Armbruster wrote:
> Stefano Garzarella <sgarzare@redhat.com> writes:
> 
> > Reword and add a missing parentheses at the end of the
> > error message.
> >
> > Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
> > Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> > ---
> > v2:
> >   - Reworded the error message (Markus)
> >   - Added Marc-André's R-b
> >     I made a little change to the error message, let me now
> >     if I should remove yuor R-b.
> > ---
> >  net/slirp.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/net/slirp.c b/net/slirp.c
> > index 95934fb36d..b34cb29276 100644
> > --- a/net/slirp.c
> > +++ b/net/slirp.c
> > @@ -498,7 +498,8 @@ static int net_slirp_init(NetClientState *peer, const char *model,
> >      }
> >      if (vprefix6_len < 0 || vprefix6_len > 126) {
> >          error_setg(errp,
> > -                   "Invalid prefix provided (prefix len must be in range 0-126");
> > +                   "Invalid IPv6 prefix provided "
> > +                   "(IPv6 prefix length must be between 0 and 126)");
> >          return -1;
> >      }
> 
> "Parameter 'ipv6-prefixlen' expects a value between 0 and 126" would be
> closer to how we report similar errors elsewhere.

This error is shown when 'ipv6-net' or 'ipv6-prefixlen' parameters are
used, so I preferred to leave a more generic error to fit both cases.

> 
> Regardless:
> Reviewed-by: Markus Armbruster <armbru@redhat.com>

Thanks,
Stefano

Re: [Qemu-devel] [PATCH v2] net/slirp: fix the IPv6 prefix length error message

Posted by Philippe Mathieu-Daudé 6 days ago
On 5/15/19 3:01 PM, Stefano Garzarella wrote:
> On Wed, May 15, 2019 at 02:33:03PM +0200, Markus Armbruster wrote:
>> Stefano Garzarella <sgarzare@redhat.com> writes:
>>
>>> Reword and add a missing parentheses at the end of the
>>> error message.
>>>
>>> Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
>>> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
>>> ---
>>> v2:
>>>   - Reworded the error message (Markus)
>>>   - Added Marc-André's R-b
>>>     I made a little change to the error message, let me now
>>>     if I should remove yuor R-b.
>>> ---
>>>  net/slirp.c | 3 ++-
>>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/net/slirp.c b/net/slirp.c
>>> index 95934fb36d..b34cb29276 100644
>>> --- a/net/slirp.c
>>> +++ b/net/slirp.c
>>> @@ -498,7 +498,8 @@ static int net_slirp_init(NetClientState *peer, const char *model,
>>>      }
>>>      if (vprefix6_len < 0 || vprefix6_len > 126) {
>>>          error_setg(errp,
>>> -                   "Invalid prefix provided (prefix len must be in range 0-126");
>>> +                   "Invalid IPv6 prefix provided "
>>> +                   "(IPv6 prefix length must be between 0 and 126)");
>>>          return -1;
>>>      }
>>
>> "Parameter 'ipv6-prefixlen' expects a value between 0 and 126" would be
>> closer to how we report similar errors elsewhere.
> 
> This error is shown when 'ipv6-net' or 'ipv6-prefixlen' parameters are
> used, so I preferred to leave a more generic error to fit both cases.
> 
>>
>> Regardless:
>> Reviewed-by: Markus Armbruster <armbru@redhat.com>

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>