[pve-devel] [PATCH container] fix #5742: lxc: setup: centos template keep static ipv6 assignment
Thomas Lamprecht
t.lamprecht at proxmox.com
Fri Nov 8 16:08:30 CET 2024
Am 28/10/2024 um 16:58 schrieb Daniel Herzig:
> 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)
FYI, you missed updating the tests (and I checked to late), so I fixed that up
in a follow-up commit [0], please do a full build+deploy cycle before sending
patches to catch such things.
[0]: https://git.proxmox.com/?p=pve-container.git;a=commitdiff;h=1df0a49b5b30c0a7c3d50f435fabbb37c0c92b8d
More information about the pve-devel
mailing list