subtract ipv4, not ipv6

This commit is contained in:
Nico Schottelius 2019-07-17 17:54:05 +02:00
parent e10e4db6fa
commit 2338d4d780

View file

@ -61,7 +61,7 @@ action delta_udp_from_v4_to_v6()
tmp = tmp + 1;
tmp[16:16] = 0;
}
tmp = tmp + (bit<17>) (0xffff - meta.v6sum);
tmp = tmp + (bit<17>) (0xffff - meta.v4sum);
if (tmp[16:16] == 1) {
tmp = tmp + 1;
tmp[16:16] = 0;
@ -79,7 +79,7 @@ action delta_tcp_from_v4_to_v6()
tmp = tmp + 1;
tmp[16:16] = 0;
}
tmp = tmp + (bit<17>) (0xffff - meta.v6sum);
tmp = tmp + (bit<17>) (0xffff - meta.v4sum);
if (tmp[16:16] == 1) {
tmp = tmp + 1;
tmp[16:16] = 0;