Clarify execution order in nat64/nat46 case
This commit is contained in:
		
					parent
					
						
							
								0540b43f7f
							
						
					
				
			
			
				commit
				
					
						658227cd5b
					
				
			
		
					 2 changed files with 18 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -467,6 +467,15 @@ DEBUG:main:v6 reassambled=<Ether  dst=00:00:0a:00:00:42 src=00:00:0a:00:00:01 ty
 | 
			
		|||
debugging MIGHT come from nat64 table!
 | 
			
		||||
 | 
			
		||||
**** DONE Add table name support in debug messages
 | 
			
		||||
**** TODO 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
 | 
			
		||||
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=2001:db8::1 dst=ff02::1:ff00:42 |<ICMPv6ND_NS  type=Neighbor Solicitation code=0 cksum=0x13a7 res=0 tgt=2001:db8::42 |<ICMPv6NDOptSrcLLAddr  type=1 len=1 lladdr=00:00:0a:00:00:01 |>>>> from table TABLE_NAT64
 | 
			
		||||
INFO:main:unhandled reassambled=<Ether  dst=00:00:0a:00:00:42 src=00:00:0a:00:00:01 type=0x86dd |<IPv6  version=6 tc=0 fl=920946 plen=64 nh=ICMPv6 hlim=64 src=2001:db8::1 dst=2001:db8:1::a00:1 |<ICMPv6EchoRequest  type=Echo Request code=0 cksum=0x3d1a id=0xade seq=0x1 data='\x1f\x92\x9a\\\x00\x00\x00\x00WU\x02\x00\x00\x00\x00\x00\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !"#$%&\'()*+,-./01234567' |>>> from table TABLE_V4_NETWORKS
 | 
			
		||||
**** TODO Solve logic problem: Valid headers
 | 
			
		||||
- If ipv6 header is valid && nat64 will be made and afterwards v4 egress needs to be applied
 | 
			
		||||
- If ipv4 header is valid && nat46 will be made and afterwards v6 egress needs to be applied
 | 
			
		||||
 | 
			
		||||
**** TODO Make switch answer IPv4 icmp echo request for
 | 
			
		||||
**** TODO Add / check default route for v4 hosts
 | 
			
		||||
*** TODO Get p4 VM / vagrant running
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -335,11 +335,16 @@ control MyIngress(inout headers hdr,
 | 
			
		|||
    apply {
 | 
			
		||||
        if(hdr.ipv6.isValid()) {
 | 
			
		||||
            icmp6.apply();       /* icmp6 echo, icmp6 ndp */
 | 
			
		||||
            nat64.apply();       /* translating */
 | 
			
		||||
            if(nat64.apply().hit) {       /* translating */
 | 
			
		||||
                v4_networks.apply(); /* apply egress */
 | 
			
		||||
                exit; /* no further v6 processing */
 | 
			
		||||
            }
 | 
			
		||||
            v6_networks.apply(); /* egress / routing */
 | 
			
		||||
        }
 | 
			
		||||
        if(hdr.ipv4.isValid()) {
 | 
			
		||||
            nat46.apply();       /* v4->v6 */
 | 
			
		||||
        } else if(hdr.ipv4.isValid()) {
 | 
			
		||||
            if(nat46.apply().hit) {       /* v4->v6 */
 | 
			
		||||
                v6_networks.apply();      /* Now apply v6 egress */
 | 
			
		||||
                exit; /* no further v4 processing */
 | 
			
		||||
            }
 | 
			
		||||
            v4_networks.apply(); /* routing, egress */
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue