diff --git a/doc/plan.org b/doc/plan.org index 0d6aff6..2532d9b 100644 --- a/doc/plan.org +++ b/doc/plan.org @@ -61,6 +61,11 @@ | | - send back to switch | | | | - test with host | | | | | | +| 2019-03-06 | Meet Laurent #3 | | +| | - Checksum's in scapy | | +| | - Python2 ipaddress fix (import future) | | +| | - P4 checksum_with_payload | | +| | | | | | | | | 2019-03-08 | NAT46 1:1 table ICMP, ICMPv6 working | | | | Will need some switch local ip addresses | | diff --git a/p4app/controller.py b/p4app/controller.py index a5ac4f1..60d934f 100644 --- a/p4app/controller.py +++ b/p4app/controller.py @@ -248,10 +248,11 @@ class L2Controller(object): i2 = ICMPv6ND_NA(S=1, R=0, tgt=src_addr) i3 = ICMPv6NDOptDstLLAddr(lladdr=src_mac) - # Force scapy to recalculate ?? - i.chksum = None - answer = e / i / i2 / i3 + + # Let scapy recalc checksum (try3) + answer = answer.__class__(str(answer)) + self.send_pkg(answer) def send_pkg(self, pkg): @@ -283,7 +284,6 @@ class L2Controller(object): elif cpu_header.task == self.task['ICMP6_GENERAL']: log.info("Replying to ICMP packet") - else: print("Broken pkg: {}".format(pkg.__repr__())) return