From 55aab8cc84bc1d87bd53878bd0c223d2628b1e2f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 2 Apr 2019 17:05:53 +0200 Subject: [PATCH] Fix test to use correct host --- doc/plan.org | 40 ++++++++++++++++++++-------------------- p4app/test.py | 6 +++--- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/doc/plan.org b/doc/plan.org index f96c598..9aff84c 100644 --- a/doc/plan.org +++ b/doc/plan.org @@ -670,6 +670,26 @@ INFO:main:unhandled reassambled=>>> from table TABLE_V6_NETWORKS INFO:main:unhandled reassambled=>>> from table TABLE_NAT64 INFO:main:unhandled reassambled=>> from table TABLE_V4_NETWORKS +**** DONE Solve logic problem: Valid headers +- If ipv6 header is valid && nat64 will be made and afterwards v4 egress needs to be applied +- If ipv4 header is valid && nat46 will be made and afterwards v6 egress needs to be applied +**** TODO Check translated fields +***** DONE source correctly translated to 10.1.1.1 +***** DONE destination correctly translated to 10.0.0.1 -> pings h3 +***** DONE egress is correct, comes out at h3 +***** DONE protocol 58 is wrong -> should be 1 +***** DONE figure out switch() syntax +***** TODO transform protocol specific: icmp6 -> icmp +****** DONE Implement double table, as there are no if's in actions +****** DONE Debug Ethernet frame check sequence error -> need to compute checksum + https://en.wikipedia.org/wiki/Frame_check_sequence + +According to Edgar this should not be seen anyway. +****** TODO Calculate ICMP checksum +****** TODO Check field lengths +***** TODO transform protocol specific: icmp -> icmp6 +**** TODO Make switch answer IPv4 icmp echo request for +**** TODO Add / check default route for v4 hosts **** TODO Update p4c to avoid compiler bug ***** TODO Updating p4c ****** DONE Try1 @@ -739,26 +759,6 @@ p4@ubuntu:~/p4-tools/p4c/build$ [16:37] line:p4c% git describe --always 900557c5 ****** TODO Build on VM with 900557c5 after removing build/ -**** DONE Solve logic problem: Valid headers -- If ipv6 header is valid && nat64 will be made and afterwards v4 egress needs to be applied -- If ipv4 header is valid && nat46 will be made and afterwards v6 egress needs to be applied -**** TODO Check translated fields -***** DONE source correctly translated to 10.1.1.1 -***** DONE destination correctly translated to 10.0.0.1 -> pings h3 -***** DONE egress is correct, comes out at h3 -***** DONE protocol 58 is wrong -> should be 1 -***** DONE figure out switch() syntax -***** TODO transform protocol specific: icmp6 -> icmp -****** DONE Implement double table, as there are no if's in actions -****** DONE Debug Ethernet frame check sequence error -> need to compute checksum - https://en.wikipedia.org/wiki/Frame_check_sequence - -According to Edgar this should not be seen anyway. -****** TODO Calculate ICMP checksum -****** TODO Check field lengths -***** TODO transform protocol specific: icmp -> icmp6 -**** TODO Make switch answer IPv4 icmp echo request for -**** TODO Add / check default route for v4 hosts *** TODO Get p4 VM / vagrant running **** DONE install libvirtd-daemon **** DONE install ebtables diff --git a/p4app/test.py b/p4app/test.py index a934567..f2d8526 100755 --- a/p4app/test.py +++ b/p4app/test.py @@ -21,7 +21,7 @@ class TestStuff(object): dst_ipv6 = ipaddress.ip_address("2001:db8::42") log.info("Trying to reach {} from {}".format(dst_ipv6, host)) - cmd = "mx h1 ping6 -c1 {}".format(dst_ipv6).split(" ") + cmd = "mx {} ping6 -c1 {}".format(host, dst_ipv6).split(" ") return cmd @@ -30,7 +30,7 @@ class TestStuff(object): dst = ipaddress.ip_address("10.0.0.66") log.info("Trying to reach {} from {}".format(dst, host)) - cmd = "mx h1 ping -c1 {}".format(dst).split(" ") + cmd = "mx {} ping -c1 {}".format(host, dst).split(" ") return cmd @@ -41,7 +41,7 @@ class TestStuff(object): translated_ipv4 = nat64_prefix[int(dst_ipv4)] log.info("Trying to reach {} ({}) from {}".format(dst_ipv4, translated_ipv4, host)) - cmd = "mx h1 ping6 -c1 {}".format(translated_ipv4).split(" ") + cmd = "mx {} ping6 -c1 {}".format(host, translated_ipv4).split(" ") return cmd