public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH pve-common] fix #4299: network : disable_ipv6: fix path checking
@ 2022-10-19 22:24 Alexandre Derumier
  2022-10-20 10:05 ` Wolfgang Bumiller
  2023-01-16  9:45 ` [pve-devel] applied: " Wolfgang Bumiller
  0 siblings, 2 replies; 6+ messages in thread
From: Alexandre Derumier @ 2022-10-19 22:24 UTC (permalink / raw)
  To: pve-devel

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@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




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-01-16  9:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-19 22:24 [pve-devel] [PATCH pve-common] fix #4299: network : disable_ipv6: fix path checking Alexandre Derumier
2022-10-20 10:05 ` Wolfgang Bumiller
2022-10-20 16:18   ` DERUMIER, Alexandre
     [not found]     ` <mailman.64.1666287516.489.pve-devel@lists.proxmox.com>
2022-10-21  4:55       ` DERUMIER, Alexandre
2022-10-21  8:16         ` Wolfgang Bumiller
2023-01-16  9:45 ` [pve-devel] applied: " Wolfgang Bumiller

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