Clarify execution order in nat64/nat46 case

This commit is contained in:
Nico Schottelius 2019-03-26 22:06:35 +01:00
commit 658227cd5b
2 changed files with 18 additions and 4 deletions

View file

@ -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 */
}
}