put the diff into the checksum

This commit is contained in:
Nico Schottelius 2019-07-10 14:49:23 +02:00
parent ff4a190d8e
commit 9fdc909838

View file

@ -197,7 +197,8 @@ control MyIngress(inout headers hdr,
v4sum();
v6sum();
bit<16> diff = meta.v6sum - meta.v4sum;
hdr.udp.checksum = hdr.udp.checksum + diff;
# hdr.udp.checksum = hdr.udp.checksum + diff;
hdr.udp.checksum = diff;
#else
meta.chk_udp_v6 = 1;