Mixed up condition for output port...
This commit is contained in:
parent
bcc039cb31
commit
94c98e6d20
2 changed files with 11 additions and 11 deletions
|
@ -146,15 +146,15 @@ action nat46_generic(ipv6_addr_t src, ipv6_addr_t dst) {
|
|||
}
|
||||
|
||||
|
||||
/* matching key: v4_network specified again */
|
||||
action nat46_static(ipv6_addr_t v6_src, ipv4_addr_t v4_dst, ipv6_addr_t nat64_prefix) {
|
||||
ipv6_addr_t src = nat64_prefix + (ipv6_addr_t) hdr.ipv4.src_addr;
|
||||
/* matching key: v4_network specified again */
|
||||
action nat46_static(ipv6_addr_t v6_src, ipv4_addr_t v4_dst, ipv6_addr_t nat64_prefix) {
|
||||
ipv6_addr_t src = nat64_prefix + (ipv6_addr_t) hdr.ipv4.src_addr;
|
||||
|
||||
ipv4_addr_t dst_offset = hdr.ipv4.dst_addr - v4_dst;
|
||||
ipv6_addr_t dst = v6_src + (ipv6_addr_t) dst_offset;
|
||||
ipv4_addr_t dst_offset = hdr.ipv4.dst_addr - v4_dst;
|
||||
ipv6_addr_t dst = v6_src + (ipv6_addr_t) dst_offset;
|
||||
|
||||
nat46_generic(src, dst);
|
||||
}
|
||||
nat46_generic(src, dst);
|
||||
}
|
||||
|
||||
table nat64 {
|
||||
key = {
|
||||
|
|
|
@ -25,8 +25,8 @@ if(hdr.ipv6.isValid()) {
|
|||
if(hdr.tcp.isValid()) {
|
||||
delta_tcp_from_v6_to_v4
|
||||
}
|
||||
apply_v4networks = false;
|
||||
apply_v6networks = true;
|
||||
apply_v4networks = true;
|
||||
apply_v6networks = false;
|
||||
}
|
||||
} else if(hdr.ipv4.isValid()) {
|
||||
apply_v4networks = true;
|
||||
|
@ -48,8 +48,8 @@ if(hdr.ipv6.isValid()) {
|
|||
if(hdr.tcp.isValid()) {
|
||||
delta_tcp_from_v4_to_v6
|
||||
}
|
||||
apply_v4networks = true;
|
||||
apply_v6networks = false;
|
||||
apply_v4networks = false;
|
||||
apply_v6networks = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue