[lxc-devel] [PATCH] config_ipv6: run inet_pton on the addr value without mask
Serge Hallyn
serge.hallyn at ubuntu.com
Fri Aug 23 17:45:15 UTC 2013
otherwise a "$addr/$mask" results in failure.
Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
---
src/lxc/confile.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/lxc/confile.c b/src/lxc/confile.c
index f44835b..57797ad 100644
--- a/src/lxc/confile.c
+++ b/src/lxc/confile.c
@@ -759,8 +759,8 @@ static int config_network_ipv6(const char *key, const char *value,
inet6dev->prefix = atoi(netmask);
}
- if (!inet_pton(AF_INET6, value, &inet6dev->addr)) {
- SYSERROR("invalid ipv6 address: %s", value);
+ if (!inet_pton(AF_INET6, valdup, &inet6dev->addr)) {
+ SYSERROR("invalid ipv6 address: %s", valdup);
free(list);
free(inet6dev);
free(valdup);
--
1.8.1.2
More information about the lxc-devel
mailing list