Setup the cast_length in icmp->icmp6 translations

This commit is contained in:
Nico Schottelius 2019-04-03 12:44:00 +02:00
commit 71d1e86d3f
2 changed files with 4 additions and 0 deletions

View file

@ -167,6 +167,7 @@ Echo or Echo Reply Message
hdr.ipv6.next_header = PROTO_ICMP6;
meta.chk_icmp6 = 1;
meta.cast_length = (bit<32>) hdr.ipv6.payload_length;
hdr.icmp.setInvalid();
}
@ -437,9 +438,11 @@ Echo or Echo Reply Message
if(hdr.icmp6.type == ICMP6_ECHO_REPLY) {
hdr.icmp.type = ICMP_ECHO_REPLY;
hdr.icmp.code = 0;
}
if(hdr.icmp6.type == ICMP6_ECHO_REQUEST) {
hdr.icmp.type = ICMP_ECHO_REQUEST;
hdr.icmp.code = 0;
}
}