From f0356782d58c7cd602e5e78f070c52c4c86bfacd Mon Sep 17 00:00:00 2001 From: Julien Rabier Date: Thu, 21 May 2020 15:54:14 +0000 Subject: [PATCH 1/2] fix v6 detection when using wg-quick and probably other weird routing setups --- data/hooks/diagnosis/10-ip.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/hooks/diagnosis/10-ip.py b/data/hooks/diagnosis/10-ip.py index fe4993935..b18b4f435 100644 --- a/data/hooks/diagnosis/10-ip.py +++ b/data/hooks/diagnosis/10-ip.py @@ -108,7 +108,7 @@ class IPDiagnoser(Diagnoser): return False # If we are indeed connected in ipv4 or ipv6, we should find a default route - routes = check_output("ip -%s route" % protocol).split("\n") + routes = check_output("ip -%s route show table all" % protocol).split("\n") def is_default_route(r): # Typically the default route starts with "default" From e7a4b26af8ed5a7b4ccbe75b2521c728a9593517 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 21 May 2020 18:01:14 +0200 Subject: [PATCH 2/2] Also propagate to utils/network.py because we like to maintain duplicated code ;P --- src/yunohost/utils/network.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/yunohost/utils/network.py b/src/yunohost/utils/network.py index ccd938fd4..4bb0b288a 100644 --- a/src/yunohost/utils/network.py +++ b/src/yunohost/utils/network.py @@ -57,7 +57,7 @@ def get_public_ip_from_remote_server(protocol=4): return None # If we are indeed connected in ipv4 or ipv6, we should find a default route - routes = check_output("ip -%s route" % protocol).split("\n") + routes = check_output("ip -%s route show table all" % protocol).split("\n") def is_default_route(r): # Typically the default route starts with "default" # But of course IPv6 is more complex ... e.g. on internet cube there's