Fix off-by-one in tcp, too

This commit is contained in:
Nico Schottelius 2019-07-10 21:35:25 +02:00
parent 7cc52b3c0d
commit 6812dc46fd

View file

@ -209,7 +209,7 @@ control MyIngress(inout headers hdr,
v4sum(); v4sum();
v6sum(); v6sum();
bit<16> diff = meta.v6sum - meta.v4sum; bit<16> diff = meta.v6sum - meta.v4sum;
hdr.tcp.checksum = hdr.tcp.checksum + ~diff; hdr.tcp.checksum = hdr.tcp.checksum + ~diff +1;
#else #else