[pve-devel] [PATCH container] fix #5742: lxc: setup: centos template keep static ipv6 assignment
Daniel Herzig
d.herzig at proxmox.com
Mon Oct 28 16:58:03 CET 2024
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 at gmail.com>
Signed-off-by: Daniel Herzig <d.herzig at 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
More information about the pve-devel
mailing list