Also propagate to utils/network.py because we like to maintain duplicated code ;P

This commit is contained in:
Alexandre Aubin 2020-05-21 18:01:14 +02:00 committed by GitHub
parent f0356782d5
commit e7a4b26af8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -57,7 +57,7 @@ def get_public_ip_from_remote_server(protocol=4):
return None return None
# If we are indeed connected in ipv4 or ipv6, we should find a default route # 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): def is_default_route(r):
# Typically the default route starts with "default" # Typically the default route starts with "default"
# But of course IPv6 is more complex ... e.g. on internet cube there's # But of course IPv6 is more complex ... e.g. on internet cube there's