From 8538f3880636497c3b1345cb559dd042f374bdc2 Mon Sep 17 00:00:00 2001 From: Christian Seiler Date: Tue, 15 Jan 2013 14:44:25 +0100 Subject: [PATCH] Multiple IP addresses: add them in the correct order MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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: Christian Seiler Acked-by: Serge E. Hallyn Acked-by: Stéphane Graber --- 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 034136ef5..da8708878 100644 --- a/src/lxc/confile.c +++ b/src/lxc/confile.c @@ -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; -- 2.47.2