Browse Source

Fix off-by-one in tcp, too

master
Nico Schottelius 3 years ago
parent
commit
6812dc46fd
  1. 2
      p4src/checksum_diff.p4

2
p4src/checksum_diff.p4

@ -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

Loading…
Cancel
Save