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
1 changed files with 1 additions and 1 deletions

View File

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