try resetting cksum (again)

This commit is contained in:
Nico Schottelius 2019-03-05 21:49:50 +01:00
parent 7d53abef6d
commit 81f89fe87a
2 changed files with 12 additions and 5 deletions

View File

@ -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 | |

View File

@ -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):