Signed-off-by: Nico Schottelius <nico@nico-notebook.schottelius.org>
This commit is contained in:
Nico Schottelius 2019-04-11 10:57:30 +02:00
commit 079699c687
2 changed files with 76 additions and 18 deletions

View file

@ -55,34 +55,28 @@ class TestStuff(object):
return cmd
def test_v6_udp_to_v4(self):
""" unfinished """
"""
"""
print('mx h3 "echo V4-OK | socat - UDP-LISTEN:2342"')
print('mx h1 "echo V6-OK | socat - UDP6:[2001:db8:1::a00:1]:2342"')
return
host = "h1"
dst_ipv6 = ipaddress.ip_address("2001:db8::42")
def test_v6_tcp_to_v4(self):
print('mx h3 "echo V4-OK | socat - TCP-LISTEN:2342"')
print('mx h1 "echo V6-OK | socat - TCP6:[2001:db8:1::a00:1]:2342"')
log.info("Trying to reach {} from {}".format(dst_ipv6, host))
cmd = "mx {} ping6 -c1 {}".format(host, dst_ipv6).split(" ")
return
return cmd
def test_v4_tcp_to_v6(self):
print('mx h3 "echo V4-OK | socat - TCP:10.1.1.1:2342"')
print('mx h1 "echo V6-OK | socat - TCP-LISTEN:2342"')
host = "h1"
nat64_prefix = ipaddress.ip_network("2001:db8:1::/96")
dst_ipv4 = ipaddress.ip_address("10.0.0.1")
translated_ipv4 = nat64_prefix[int(dst_ipv4)]
return
log.info("Trying to reach {} ({}) from {}".format(dst_ipv4, translated_ipv4, host))
cmd = "mx {} ping6 -c1 {}".format(host, translated_ipv4).split(" ")
def test_v4_udp_to_v6(self):
print('mx h3 "echo V4-OK | socat - UDP:10.1.1.1:2342"')
print('mx h1 "echo V6-OK | socat - UDP-LISTEN:2342"')
return cmd
return
def commandline(self):