Correct address types
This commit is contained in:
parent
ab8e328dd3
commit
255973a4c9
1 changed files with 2 additions and 2 deletions
|
@ -116,11 +116,11 @@ control MyIngress(inout headers hdr,
|
|||
|
||||
|
||||
/* nat64_prefix is the same as the matching key, but without the mask */
|
||||
action nat64_static(ipv4_addr_t v6_network, ipv4_addr_t v4_network, ipv6_addr_t nat64_prefix) {
|
||||
action nat64_static(ipv6_addr_t v6_network, ipv4_addr_t v4_network, ipv6_addr_t nat64_prefix) {
|
||||
ipv6_addr_t src_offset = hdr.ipv6.src_addr - v6_network;
|
||||
ipv4_addr_t src = v4_network + (ipv4_addr_t) src_offset;
|
||||
|
||||
ipv6_addr_t dst = (ipv4_addr_t) hdr.ipv6.dst_addr - nat64_prefix;
|
||||
ipv4_addr_t dst = (ipv4_addr_t) hdr.ipv6.dst_addr - nat64_prefix;
|
||||
|
||||
nat64_generic(src, dst);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue