confile: Fix invalid lxc.network.ipv6 address

The writer code was using AF_INET instead of AF_INET6 when converting the address to ascii. Signed-off-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
parent f2a95ee1
......@@ -2096,7 +2096,7 @@ void write_config(FILE *fout, struct lxc_conf *c)
lxc_list_for_each(it2, &n->ipv6) {
struct lxc_inet6dev *i = it2->elem;
char buf[INET6_ADDRSTRLEN];
inet_ntop(AF_INET, &i->addr, buf, sizeof(buf));
inet_ntop(AF_INET6, &i->addr, buf, sizeof(buf));
fprintf(fout, "lxc.network.ipv6 = %s\n", buf);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment