rewrite checksum triggers in ndp/echo reply

This commit is contained in:
Nico Schottelius 2019-03-30 17:19:17 +01:00
parent 74657385b2
commit cd3084d8f9
2 changed files with 8 additions and 14 deletions

View file

@ -524,6 +524,8 @@ p4@ubuntu:~/master-thesis/pcap$
-> NDP is going to the controller instead of being handled by the switch -> NDP is going to the controller instead of being handled by the switch
INFO:main:unhandled reassambled=<Ether dst=33:33:ff:00:00:42 src=00:00:0a:00:00:01 type=0x86dd |<IPv6 version=6 tc=0 fl=0 plen=32 nh=ICMPv6 hlim=255 src=fe80::200:aff:fe00:1 dst=ff02::1:ff00:42 |<ICMPv6ND_NS type=Neighbor Solicitation code=0 cksum=0x37df res=0 tgt=2001:db8::42 |<ICMPv6NDOptSrcLLAddr type=1 len=1 lladdr=00:00:0a:00:00:01 |>>>> from table TABLE_V6_NETWORKS INFO:main:unhandled reassambled=<Ether dst=33:33:ff:00:00:42 src=00:00:0a:00:00:01 type=0x86dd |<IPv6 version=6 tc=0 fl=0 plen=32 nh=ICMPv6 hlim=255 src=fe80::200:aff:fe00:1 dst=ff02::1:ff00:42 |<ICMPv6ND_NS type=Neighbor Solicitation code=0 cksum=0x37df res=0 tgt=2001:db8::42 |<ICMPv6NDOptSrcLLAddr type=1 len=1 lladdr=00:00:0a:00:00:01 |>>>> from table TABLE_V6_NETWORKS
-> checksums likely broken again due to checksum changes
**** DONE Add table name support in debug messages **** DONE Add table name support in debug messages
**** DONE Why getting IPv6 packets in **** DONE Why getting IPv6 packets in
INFO:main:unhandled reassambled=<Ether dst=33:33:ff:00:00:42 src=00:00:0a:00:00:01 type=0x86dd |<IPv6 version=6 tc=0 fl=0 plen=32 nh=ICMPv6 hlim=255 src=fe80::200:aff:fe00:1 dst=ff02::1:ff00:42 |<ICMPv6ND_NS type=Neighbor Solicitation code=0 cksum=0x37df res=0 tgt=2001:db8::42 |<ICMPv6NDOptSrcLLAddr type=1 len=1 lladdr=00:00:0a:00:00:01 |>>>> from table TABLE_V6_NETWORKS INFO:main:unhandled reassambled=<Ether dst=33:33:ff:00:00:42 src=00:00:0a:00:00:01 type=0x86dd |<IPv6 version=6 tc=0 fl=0 plen=32 nh=ICMPv6 hlim=255 src=fe80::200:aff:fe00:1 dst=ff02::1:ff00:42 |<ICMPv6ND_NS type=Neighbor Solicitation code=0 cksum=0x37df res=0 tgt=2001:db8::42 |<ICMPv6NDOptSrcLLAddr type=1 len=1 lladdr=00:00:0a:00:00:01 |>>>> from table TABLE_V6_NETWORKS

View file

@ -264,17 +264,8 @@ Echo or Echo Reply Message
hdr.icmp6_option_link_layer_addr.ll_length = 1; /* 1* 64 bit */ hdr.icmp6_option_link_layer_addr.ll_length = 1; /* 1* 64 bit */
hdr.icmp6_option_link_layer_addr.mac_addr = mac_addr; hdr.icmp6_option_link_layer_addr.mac_addr = mac_addr;
/* version1: rebuilding packet */ /* 5. Checksum trigger/info */
/* meta.chk_icmp6_na_ns = 1;
truncate((bit<32>)(112 + 320 + 32)/8);
hdr.icmp6_na.setValid();
hdr.icmp6_na.solicitated = 1;
hdr.icmp6_na.override = 1;
*/
/* checksum trigger / content */
meta.switch_task = TASK_CHECKSUM_ICMP6_NA;
meta.cast_length = (bit<32>) hdr.ipv6.payload_length; meta.cast_length = (bit<32>) hdr.ipv6.payload_length;
} }
@ -289,7 +280,8 @@ Echo or Echo Reply Message
hdr.icmp6.type = ICMP6_ECHO_REPLY; hdr.icmp6.type = ICMP6_ECHO_REPLY;
meta.switch_task = TASK_CHECKSUM_ICMP6; meta.chk_icmp6 = 1;
meta.cast_length = (bit<32>) hdr.ipv6.payload_length; meta.cast_length = (bit<32>) hdr.ipv6.payload_length;
} }
@ -373,8 +365,6 @@ Echo or Echo Reply Message
/********************** APPLYING TABLES ***********************************/ /********************** APPLYING TABLES ***********************************/
apply { apply {
if(hdr.ipv6.isValid()) { if(hdr.ipv6.isValid()) {
icmp6.apply(); /* icmp6 echo, icmp6 ndp */
if(nat64.apply().hit) { /* generic nat64 done */ if(nat64.apply().hit) { /* generic nat64 done */
if(hdr.icmp6.isValid()) { if(hdr.icmp6.isValid()) {
nat64_icmp6_generic(); nat64_icmp6_generic();
@ -391,6 +381,8 @@ Echo or Echo Reply Message
exit; /* no further v6 processing */ exit; /* no further v6 processing */
} }
icmp6.apply(); /* icmp6 echo, icmp6 ndp */
v6_networks.apply(); /* regular egress / routing */ v6_networks.apply(); /* regular egress / routing */
} else if(hdr.ipv4.isValid()) { } else if(hdr.ipv4.isValid()) {
if(nat46.apply().hit) { if(nat46.apply().hit) {