rewrite checksum triggers in ndp/echo reply
This commit is contained in:
		
					parent
					
						
							
								74657385b2
							
						
					
				
			
			
				commit
				
					
						cd3084d8f9
					
				
			
		
					 2 changed files with 8 additions and 14 deletions
				
			
		| 
						 | 
				
			
			@ -524,6 +524,8 @@ p4@ubuntu:~/master-thesis/pcap$
 | 
			
		|||
-> 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
 | 
			
		||||
 | 
			
		||||
-> checksums likely broken again due to checksum changes
 | 
			
		||||
 | 
			
		||||
**** DONE Add table name support in debug messages
 | 
			
		||||
**** 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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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.mac_addr = mac_addr;
 | 
			
		||||
 | 
			
		||||
        /* version1: rebuilding packet */
 | 
			
		||||
        /*
 | 
			
		||||
        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;
 | 
			
		||||
        /* 5. Checksum trigger/info */
 | 
			
		||||
        meta.chk_icmp6_na_ns = 1;
 | 
			
		||||
        meta.cast_length = (bit<32>) hdr.ipv6.payload_length;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -289,7 +280,8 @@ Echo or Echo Reply Message
 | 
			
		|||
 | 
			
		||||
        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;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -373,8 +365,6 @@ Echo or Echo Reply Message
 | 
			
		|||
	/********************** APPLYING TABLES ***********************************/
 | 
			
		||||
    apply {
 | 
			
		||||
        if(hdr.ipv6.isValid()) {
 | 
			
		||||
            icmp6.apply();       /* icmp6 echo, icmp6 ndp */
 | 
			
		||||
 | 
			
		||||
            if(nat64.apply().hit) { /* generic nat64 done */
 | 
			
		||||
                if(hdr.icmp6.isValid()) {
 | 
			
		||||
                    nat64_icmp6_generic();
 | 
			
		||||
| 
						 | 
				
			
			@ -391,6 +381,8 @@ Echo or Echo Reply Message
 | 
			
		|||
                exit;                      /* no further v6 processing */
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            icmp6.apply();       /* icmp6 echo, icmp6 ndp */
 | 
			
		||||
 | 
			
		||||
            v6_networks.apply(); /* regular egress / routing */
 | 
			
		||||
        } else if(hdr.ipv4.isValid()) {
 | 
			
		||||
            if(nat46.apply().hit) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue