Use ping6 on old systems

This commit is contained in:
Nico Schottelius 2019-03-14 20:21:31 +01:00
parent 602c52d8bb
commit e0e98535ac

View file

@ -23,7 +23,7 @@ class TestStuff(object):
translated_ipv4 = nat64_prefix[int(dst_ipv4)] translated_ipv4 = nat64_prefix[int(dst_ipv4)]
log.info("Trying to reach {} ({}) from {}".format(dst_ipv4, translated_ipv4, host)) log.info("Trying to reach {} ({}) from {}".format(dst_ipv4, translated_ipv4, host))
cmd = "mx h1 ping -c1 {}".format(translated_ipv4).split(" ") cmd = "mx h1 ping6 -c1 {}".format(translated_ipv4).split(" ")
subprocess.call(cmd) subprocess.call(cmd)
@ -34,7 +34,8 @@ class TestStuff(object):
methods = [m for m in methods_dir if re.match("^test", m)] methods = [m for m in methods_dir if re.match("^test", m)]
methods = [re.sub("^test_(.*)", r"\1", m) for m in methods] methods = [re.sub("^test_(.*)", r"\1", m) for m in methods]
parser.add_argument('--method', help="which method?", choices=methods, required=True) parser.add_argument('-m',
'--method', help="which method?", choices=methods, required=True)
parser.add_argument('--debug', help='Enable debug logging', action='store_true') parser.add_argument('--debug', help='Enable debug logging', action='store_true')
parser.add_argument('--verbose', help='Enable verbose logging', action='store_true') parser.add_argument('--verbose', help='Enable verbose logging', action='store_true')
parser.add_argument('--multicast-to-controller', help='Send debug multicast to controller', action='store_true') parser.add_argument('--multicast-to-controller', help='Send debug multicast to controller', action='store_true')