try resetting cksum (again)
This commit is contained in:
parent
7d53abef6d
commit
81f89fe87a
2 changed files with 12 additions and 5 deletions
|
@ -65,6 +65,7 @@
|
||||||
| | - Checksum's in scapy | |
|
| | - Checksum's in scapy | |
|
||||||
| | - Python2 ipaddress fix (import future) | |
|
| | - Python2 ipaddress fix (import future) | |
|
||||||
| | - P4 checksum_with_payload | |
|
| | - P4 checksum_with_payload | |
|
||||||
|
| | - Reading scapy / inet6 | |
|
||||||
| | | |
|
| | | |
|
||||||
| | | |
|
| | | |
|
||||||
| 2019-03-08 | NAT46 1:1 table ICMP, ICMPv6 working | |
|
| 2019-03-08 | NAT46 1:1 table ICMP, ICMPv6 working | |
|
||||||
|
|
|
@ -246,20 +246,26 @@ class L2Controller(object):
|
||||||
|
|
||||||
# S=1 -> solicitated
|
# S=1 -> solicitated
|
||||||
i2 = ICMPv6ND_NA(S=1, R=0, tgt=src_addr)
|
i2 = ICMPv6ND_NA(S=1, R=0, tgt=src_addr)
|
||||||
|
# try5: cksum not chksum !
|
||||||
|
i2.cksum = None
|
||||||
|
|
||||||
i3 = ICMPv6NDOptDstLLAddr(lladdr=src_mac)
|
i3 = ICMPv6NDOptDstLLAddr(lladdr=src_mac)
|
||||||
|
|
||||||
answer = e / i / i2 / i3
|
answer = e / i / i2 / i3
|
||||||
|
|
||||||
# try 4
|
# try 4
|
||||||
for l in [Ether, IPv6, ICMPv6ND_NA, ICMPv6NDOptDstLLAddr]:
|
# for l in [Ether, IPv6, ICMPv6ND_NA, ICMPv6NDOptDstLLAddr]:
|
||||||
try:
|
# try:
|
||||||
del answer[l].chksum
|
# del answer[l].chksum
|
||||||
except AttributeError:
|
# except AttributeError:
|
||||||
pass
|
# pass
|
||||||
|
|
||||||
# Let scapy recalc checksum (try3)
|
# Let scapy recalc checksum (try3)
|
||||||
# answer = answer.__class__(str(answer))
|
# answer = answer.__class__(str(answer))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
self.send_pkg(answer)
|
self.send_pkg(answer)
|
||||||
|
|
||||||
def send_pkg(self, pkg):
|
def send_pkg(self, pkg):
|
||||||
|
|
Loading…
Reference in a new issue