[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH] mini-os: netfront: Fix netfront init when no netmask or gateway are provided
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> --- 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |