Try to cast inside the checksum call
This commit is contained in:
		
					parent
					
						
							
								5fe76ef9bd
							
						
					
				
			
			
				commit
				
					
						60a84af033
					
				
			
		
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -21,13 +21,13 @@ control MyVerifyChecksum(inout headers hdr, inout metadata meta) {
 | 
			
		|||
 | 
			
		||||
control MyComputeChecksum(inout headers  hdr, inout metadata meta) {
 | 
			
		||||
    apply {
 | 
			
		||||
        meta.cast_length = (bit<32>) hdr.ipv6.payload_length;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        update_checksum_with_payload(meta.do_cksum == 1,
 | 
			
		||||
		 	{
 | 
			
		||||
                hdr.ipv6.src_addr,         /* 128 */
 | 
			
		||||
		 		hdr.ipv6.dst_addr,         /* 128 */
 | 
			
		||||
                meta.cast_length,          /* 32 */
 | 
			
		||||
                meta.cast_length = (bit<32>) hdr.ipv6.payload_length;
 | 
			
		||||
                24w0,                      /* 24 0's */
 | 
			
		||||
                PROTO_ICMP6                /* 8 */
 | 
			
		||||
            },
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue