Use an action to do the same thing as before
This commit is contained in:
parent
7d9e9e1cfd
commit
12658b23ac
2 changed files with 30 additions and 4 deletions
|
|
@ -48,6 +48,12 @@ control MyIngress(inout headers hdr,
|
|||
|
||||
/********************** NAT64 / NAT46 ACTIONS ***********************************/
|
||||
|
||||
|
||||
action mimic_assign_echo_request()
|
||||
{
|
||||
hdr.icmp.type = ICMP_ECHO_REQUEST;
|
||||
}
|
||||
|
||||
/* changes for icmp6 -> icmp
|
||||
- first echo request/reply
|
||||
- later maybe other
|
||||
|
|
@ -58,11 +64,11 @@ control MyIngress(inout headers hdr,
|
|||
hdr.ipv4.protocol = PROTO_ICMP; // overwrite generic same protocol assumption
|
||||
|
||||
if(hdr.icmp6.type == ICMP6_ECHO_REQUEST) {
|
||||
hdr.icmp.type = ICMP_ECHO_REQUEST;
|
||||
}
|
||||
if(hdr.icmp6.type == ICMP6_ECHO_REPLY) {
|
||||
hdr.icmp.type = ICMP_ECHO_REPLY;
|
||||
mimic_assign_echo_request();
|
||||
}
|
||||
// if(hdr.icmp6.type == ICMP6_ECHO_REPLY) {
|
||||
// hdr.icmp.type = ICMP_ECHO_REPLY;
|
||||
// }
|
||||
|
||||
/* trigger checksumming */
|
||||
meta.switch_task = TASK_CHECKSUM_ICMP;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue