Move def of nat64_icmp6 prior to use
This commit is contained in:
parent
d2eae01bef
commit
01d9305350
1 changed files with 10 additions and 7 deletions
|
@ -48,6 +48,16 @@ control MyIngress(inout headers hdr,
|
||||||
|
|
||||||
/********************** NAT64 / NAT46 ACTIONS ***********************************/
|
/********************** NAT64 / NAT46 ACTIONS ***********************************/
|
||||||
|
|
||||||
|
/* changes for icmp6 -> icmp
|
||||||
|
- first echo request/reply
|
||||||
|
- later maybe other
|
||||||
|
*/
|
||||||
|
action nat64_icmp6()
|
||||||
|
{
|
||||||
|
hdr.ipv4.protocol = PROTO_ICMP; // overwrite generic same protocol assumption
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* NAT64 protocol unspecific changes */
|
/* NAT64 protocol unspecific changes */
|
||||||
action nat64_generic(ipv4_addr_t src, ipv4_addr_t dst) {
|
action nat64_generic(ipv4_addr_t src, ipv4_addr_t dst) {
|
||||||
hdr.ipv4.setValid();
|
hdr.ipv4.setValid();
|
||||||
|
@ -83,13 +93,6 @@ control MyIngress(inout headers hdr,
|
||||||
hdr.ipv6.setInvalid();
|
hdr.ipv6.setInvalid();
|
||||||
}
|
}
|
||||||
|
|
||||||
action nat64_icmp6()
|
|
||||||
{
|
|
||||||
|
|
||||||
hdr.ipv4.protocol = PROTO_ICMP; // overwrite generic same protocol assumption
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/* NAT46: protocol unspecific changes */
|
/* NAT46: protocol unspecific changes */
|
||||||
action nat46_generic(ipv6_addr_t src, ipv6_addr_t dst) {
|
action nat46_generic(ipv6_addr_t src, ipv6_addr_t dst) {
|
||||||
hdr.ipv6.setValid();
|
hdr.ipv6.setValid();
|
||||||
|
|
Loading…
Reference in a new issue