++ unchecked checksums
This commit is contained in:
parent
e4dd6eee93
commit
12097d0085
2 changed files with 9 additions and 4 deletions
|
@ -61,6 +61,11 @@
|
||||||
| | - send back to switch | |
|
| | - send back to switch | |
|
||||||
| | - test with host | |
|
| | - 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 | |
|
| 2019-03-08 | NAT46 1:1 table ICMP, ICMPv6 working | |
|
||||||
| | Will need some switch local ip addresses | |
|
| | Will need some switch local ip addresses | |
|
||||||
|
|
|
@ -248,10 +248,11 @@ class L2Controller(object):
|
||||||
i2 = ICMPv6ND_NA(S=1, R=0, tgt=src_addr)
|
i2 = ICMPv6ND_NA(S=1, R=0, tgt=src_addr)
|
||||||
i3 = ICMPv6NDOptDstLLAddr(lladdr=src_mac)
|
i3 = ICMPv6NDOptDstLLAddr(lladdr=src_mac)
|
||||||
|
|
||||||
# Force scapy to recalculate ??
|
|
||||||
i.chksum = None
|
|
||||||
|
|
||||||
answer = e / i / i2 / i3
|
answer = e / i / i2 / i3
|
||||||
|
|
||||||
|
# Let scapy recalc checksum (try3)
|
||||||
|
answer = answer.__class__(str(answer))
|
||||||
|
|
||||||
self.send_pkg(answer)
|
self.send_pkg(answer)
|
||||||
|
|
||||||
def send_pkg(self, pkg):
|
def send_pkg(self, pkg):
|
||||||
|
@ -283,7 +284,6 @@ class L2Controller(object):
|
||||||
elif cpu_header.task == self.task['ICMP6_GENERAL']:
|
elif cpu_header.task == self.task['ICMP6_GENERAL']:
|
||||||
log.info("Replying to ICMP packet")
|
log.info("Replying to ICMP packet")
|
||||||
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
print("Broken pkg: {}".format(pkg.__repr__()))
|
print("Broken pkg: {}".format(pkg.__repr__()))
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue