[pve-devel] applied: [PATCH pve-common] fix #4299: network : disable_ipv6: fix path checking

Wolfgang Bumiller w.bumiller at proxmox.com
Mon Jan 16 10:45:38 CET 2023


Sorry for the delay, the change definitely doesn't hurt, I was just
wondering how it would happen.

It's now applied, thanks!

On Thu, Oct 20, 2022 at 12:24:29AM +0200, Alexandre Derumier wrote:
> It's possible to have a
> /proc/sys/net/ipv6/ directory
> 
> but no
> /proc/sys/net/ipv6/conf/$iface/disable_ipv6
> 
> Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
> ---
>  src/PVE/Network.pm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/PVE/Network.pm b/src/PVE/Network.pm
> index c468e40..9d726cd 100644
> --- a/src/PVE/Network.pm
> +++ b/src/PVE/Network.pm
> @@ -210,8 +210,8 @@ my $cond_create_bridge = sub {
>  
>  sub disable_ipv6 {
>      my ($iface) = @_;
> -    return if !-d '/proc/sys/net/ipv6'; # ipv6 might be completely disabled
>      my $file = "/proc/sys/net/ipv6/conf/$iface/disable_ipv6";
> +    return if !-e $file; # ipv6 might be completely disabled
>      open(my $fh, '>', $file) or die "failed to open $file for writing: $!\n";
>      print {$fh} "1\n" or die "failed to disable link-local ipv6 for $iface\n";
>      close($fh);
> -- 
> 2.30.2





More information about the pve-devel mailing list