[refactor] nat64 now - not only static mapping anymore
This commit is contained in:
parent
02fc065c1d
commit
b972accc73
2 changed files with 27 additions and 3 deletions
|
|
@ -234,6 +234,10 @@ Echo or Echo Reply Message
|
|||
|
||||
/********************** NAT64 sessions ***********************************/
|
||||
|
||||
/* Create a session:
|
||||
- Send data to controller
|
||||
=> controller creates entry in the session table (?)
|
||||
|
||||
action nat64_create_session()
|
||||
{
|
||||
|
||||
|
|
@ -252,7 +256,7 @@ Echo or Echo Reply Message
|
|||
default_action = controller_debug_table_id(TABLE_NAT64_SESSION);
|
||||
}
|
||||
|
||||
table nat64_tcp {
|
||||
table nat64_tcp_session {
|
||||
key = {
|
||||
hdr.ipv6.src_addr: exact;
|
||||
hdr.ipv6.dst_addr: exact;
|
||||
|
|
@ -469,6 +473,23 @@ Echo or Echo Reply Message
|
|||
/********************** APPLYING TABLES ***********************************/
|
||||
apply {
|
||||
if(hdr.ipv6.isValid()) {
|
||||
/* We hit an entry in the dynamic IPv6 range */
|
||||
if(nat64_session.apply().hit) {
|
||||
// if(hdr.icmp6.isValid()) {
|
||||
// /* If this is not a hit => will escalate to controller
|
||||
// * If this is a hit, it has a mapping */
|
||||
// nat64_icmp6_session.apply();
|
||||
// }
|
||||
// if(hdr.udp.isValid()) {
|
||||
// nat64_udp_session.apply();
|
||||
// meta.chk_udp_v4 = 1;
|
||||
// }
|
||||
if(hdr.tcp.isValid()) {
|
||||
nat64_tcp_session.apply();
|
||||
meta.chk_tcp_v4 = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if(nat64.apply().hit) { /* generic / static nat64 done */
|
||||
if(hdr.icmp6.isValid()) {
|
||||
nat64_icmp6_generic();
|
||||
Loading…
Add table
Add a link
Reference in a new issue