Commit 8538f388 by Christian Seiler Committed by Stéphane Graber

Multiple IP addresses: add them in the correct order

Make sure that when configuring containers that have interfaces containing multiple IP addresses they are added in the order of the configuration file (i.e. the first being the primary one) and not the reverse order. Signed-off-by: 's avatarChristian Seiler <christian@iwakd.de> Acked-by: 's avatarSerge E. Hallyn <serge.hallyn@ubuntu.com> Acked-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
parent f7bee6c6
......@@ -624,7 +624,7 @@ static int config_network_ipv4(const char *key, const char *value,
htonl(INADDR_BROADCAST >> inetdev->prefix);
}
lxc_list_add(&netdev->ipv4, list);
lxc_list_add_tail(&netdev->ipv4, list);
free(addr);
return 0;
......@@ -716,7 +716,7 @@ static int config_network_ipv6(const char *key, const char *value,
return -1;
}
lxc_list_add(&netdev->ipv6, list);
lxc_list_add_tail(&netdev->ipv6, list);
free(valdup);
return 0;
......
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