diff --git a/pkg/controllers/routing/utils.go b/pkg/controllers/routing/utils.go index 2bf53d25..c05dc13a 100644 --- a/pkg/controllers/routing/utils.go +++ b/pkg/controllers/routing/utils.go @@ -83,7 +83,14 @@ func ipv4IsEnabled() bool { } func ipv6IsEnabled() bool { - l, err := net.Listen("tcp6", "") + // If ipv6 is disabled with; + // + // sysctl -w net.ipv6.conf.all.disable_ipv6=1 + // + // It is still possible to listen on the any-address "::". So this + // function tries the loopback address "::1" which must be present + // if ipv6 is enabled. + l, err := net.Listen("tcp6", "[::1]:0") if err != nil { return false }