This commit is contained in:
Nico Schottelius 2019-07-15 16:13:13 +02:00
parent 52adbb1990
commit 991b725c36
1 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,7 @@ action v6sum() {
tmp = tmp + (bit<32>) hdr.ipv6.next_header; // 8 bit
carryover = tmp >> 16; /* maximum is 18*(2**16) >> 16 == 18 */
ffff) + carryover; /* Now tmp contains at maximum 65554*/
tmp = (tmp & 0xffff) + carryover; /* Now tmp contains at maximum 65554*/
carryover = tmp >> 16; /* Now carryover contains at maximum 1 */
tmp = tmp + carryover; /* No overrun possible anymore */