Correct address types

This commit is contained in:
Nico Schottelius 2019-03-14 14:41:28 +01:00
parent ab8e328dd3
commit 255973a4c9

View file

@ -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);
}