public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Daniel Herzig <d.herzig@proxmox.com>
To: pve-devel@lists.proxmox.com
Cc: Andres Moya <andres.moya.i@gmail.com>
Subject: [pve-devel] [PATCH container] fix #5742: lxc: setup: centos template keep static ipv6 assignment
Date: Mon, 28 Oct 2024 16:58:03 +0100	[thread overview]
Message-ID: <20241028155803.22900-1-d.herzig@proxmox.com> (raw)

As reported here [0], statically assigned IPv6 addresses get lost
after a short while for Rocky and Almalinux 9 containers.

As pointed out by Andres, the additional option `IPV6_AUTOCONF=no`
for the corresponding network interface seems to prevent the
configured IPv6 address to be dropped.

[0] https://bugzilla.proxmox.com/show_bug.cgi?id=5745

Reported-by: Andres Moya <andres.moya.i@gmail.com>
Signed-off-by: Daniel Herzig <d.herzig@proxmox.com>
---
 src/PVE/LXC/Setup/CentOS.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PVE/LXC/Setup/CentOS.pm b/src/PVE/LXC/Setup/CentOS.pm
index 2ad1f0c..fddcffa 100644
--- a/src/PVE/LXC/Setup/CentOS.pm
+++ b/src/PVE/LXC/Setup/CentOS.pm
@@ -228,7 +228,7 @@ sub setup_network {
 	    } elsif ($d->{ip6} eq 'dhcp') {
 		$data .= "DHCPV6C=yes\n";
 	    } else {
-		$data .= "IPV6ADDR=$d->{ip6}\n";
+		$data .= "IPV6ADDR=$d->{ip6}\nIPV6_AUTOCONF=no\n";
 		if (defined($d->{gw6})) {
 		    if (!PVE::Network::is_ip_in_cidr($d->{gw6}, $d->{ip6}, 6) &&
 			!PVE::Network::is_ip_in_cidr($d->{gw6}, 'fe80::/10', 6)
-- 
2.39.5



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


                 reply	other threads:[~2024-10-28 15:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241028155803.22900-1-d.herzig@proxmox.com \
    --to=d.herzig@proxmox.com \
    --cc=andres.moya.i@gmail.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal