[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] mini-os: netfront: Fix netfront init when no netmask or gateway are provided



Costin Lupu, le jeu. 03 sept. 2020 19:25:11 +0300, a ecrit:
> Commit 1b8ed31f introduced support for reading netmask and gateway values
> from Xenstore. However it did not take care of the initial scenario when
> these values are not provided and that is what this patch tries to fix.
> 
> Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx>

Reviewed-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>

Thanks!

> ---
>  netfront.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/netfront.c b/netfront.c
> index 205484b..1a30945 100644
> --- a/netfront.c
> +++ b/netfront.c
> @@ -376,9 +376,9 @@ out:
>       }
>      if (ip)
>          *ip = strdup(ldev->ip);
> -    if (mask)
> +    if (mask && ldev->mask)
>          *mask = strdup(ldev->mask);
> -    if (gw)
> +    if (gw && ldev->gw)
>          *gw = strdup(ldev->gw);
>  
>  err:
> -- 
> 2.20.1
> 



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.