From 81f89fe87a6449961436359c222191754a6e7843 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 5 Mar 2019 21:49:50 +0100 Subject: [PATCH] try resetting cksum (again) --- doc/plan.org | 1 + p4app/controller.py | 16 +++++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/doc/plan.org b/doc/plan.org index 2532d9b..d3bf663 100644 --- a/doc/plan.org +++ b/doc/plan.org @@ -65,6 +65,7 @@ | | - Checksum's in scapy | | | | - Python2 ipaddress fix (import future) | | | | - P4 checksum_with_payload | | +| | - Reading scapy / inet6 | | | | | | | | | | | 2019-03-08 | NAT46 1:1 table ICMP, ICMPv6 working | | diff --git a/p4app/controller.py b/p4app/controller.py index bea6fd3..3ea4d9b 100644 --- a/p4app/controller.py +++ b/p4app/controller.py @@ -246,20 +246,26 @@ class L2Controller(object): # S=1 -> solicitated i2 = ICMPv6ND_NA(S=1, R=0, tgt=src_addr) + # try5: cksum not chksum ! + i2.cksum = None + i3 = ICMPv6NDOptDstLLAddr(lladdr=src_mac) answer = e / i / i2 / i3 # try 4 - for l in [Ether, IPv6, ICMPv6ND_NA, ICMPv6NDOptDstLLAddr]: - try: - del answer[l].chksum - except AttributeError: - pass + # for l in [Ether, IPv6, ICMPv6ND_NA, ICMPv6NDOptDstLLAddr]: + # try: + # del answer[l].chksum + # except AttributeError: + # pass # Let scapy recalc checksum (try3) # answer = answer.__class__(str(answer)) + + + self.send_pkg(answer) def send_pkg(self, pkg):