[p4+plan] Try casting payload length to 32

This commit is contained in:
Nico Schottelius 2019-02-28 11:03:01 +01:00
parent b01341f48c
commit 21d1b82416
2 changed files with 28 additions and 8 deletions

View file

@ -20,13 +20,17 @@
| | | |
| | | |
| 2019-02-28 | Meet Laurent #2 | |
| | - Setup base code | |
| | - Parser for all protocols (udp,tcp,icmp,icmp6) | |
| | - Started with icmp translation | |
| | - Investigating into IPv6 based checksums | |
| | - Some issues with python2 (ipaddr) - slowing down | |
| | - Reading into various RFCs, NDP, MLD | |
| | - Reading about multicast / trying to figure out dynamic membership | |
| | - Status | |
| | * Setup base code | |
| | * Parser for all protocols (udp,tcp,icmp,icmp6) | |
| | * Started with icmp translation | |
| | * Investigating into IPv6 based checksums | |
| | * Reading into various RFCs, NDP, MLD | |
| | * Reading about multicast / trying to figure out dynamic membership | |
| | | |
| | - Challenges | |
| | * Some issues with python2 (ipaddr) - slowing down | |
| | * Forwarded and received icmp6 packets are not "accepted" | |
| | | |
| | - Questions | |
| | * Re-using code (lee howard) | |
@ -509,3 +513,19 @@ listening on h1-eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
09:47:08.190331 IP6 2001:db8:61::1 > ff02::1:ff00:42: ICMP6, neighbor solicitation, who has 2001:db8:61::42, length 32
09:47:09.190279 IP6 2001:db8:61::1 > ff02::1:ff00:42: ICMP6, neighbor solicitation, who has 2001:db8:61::42, length 32
*** TODO special rule for ff02::1:ff00:42
Semi works, replies are there, but host still retries:
p4@ubuntu:~/master-thesis$ h=1; mx h$h tcpdump -lni h$h-eth0
sudo: unable to resolve host ubuntu
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on h1-eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
09:58:04.786979 IP6 2001:db8:61::1 > ff02::1:ff00:42: ICMP6, neighbor solicitation, who has 2001:db8:61::42, length 32
09:58:04.793560 IP6 2001:db8:61::42 > 2001:db8:61::1: ICMP6, neighbor advertisement, tgt is 2001:db8:61::42, length 32
09:58:05.786311 IP6 2001:db8:61::1 > ff02::1:ff00:42: ICMP6, neighbor solicitation, who has 2001:db8:61::42, length 32
09:58:05.790506 IP6 2001:db8:61::42 > 2001:db8:61::1: ICMP6, neighbor advertisement, tgt is 2001:db8:61::42, length 32
09:58:06.786254 IP6 2001:db8:61::1 > ff02::1:ff00:42: ICMP6, neighbor solicitation, who has 2001:db8:61::42, length 32
09:58:06.792325 IP6 2001:db8:61::42 > 2001:db8:61::1: ICMP6, neighbor advertisement, tgt is 2001:db8:61::42, length 32
Maybe checksums?

View file

@ -26,7 +26,7 @@ control MyComputeChecksum(inout headers hdr, inout metadata meta) {
{
hdr.ipv6.src_addr, /* 128 */
hdr.ipv6.dst_addr, /* 128 */
hdr.ipv6.payload_length, /* 16 bit -> should be 32 according to RFC2460 - also static number? */
(bit<32>) hdr.ipv6.payload_length, /* 16 bit -> should be 32 according to RFC2460 - also static number? */
24w0, /* 24 0's */
PROTO_ICMP6 /* 8 */
},