Try to cast inside the checksum call

This commit is contained in:
Nico Schottelius 2019-03-06 19:51:54 +01:00
parent 5fe76ef9bd
commit 60a84af033

View file

@ -21,13 +21,13 @@ control MyVerifyChecksum(inout headers hdr, inout metadata meta) {
control MyComputeChecksum(inout headers hdr, inout metadata meta) {
apply {
meta.cast_length = (bit<32>) hdr.ipv6.payload_length;
update_checksum_with_payload(meta.do_cksum == 1,
{
hdr.ipv6.src_addr, /* 128 */
hdr.ipv6.dst_addr, /* 128 */
meta.cast_length, /* 32 */
meta.cast_length = (bit<32>) hdr.ipv6.payload_length;
24w0, /* 24 0's */
PROTO_ICMP6 /* 8 */
},