From beada8408acac72b6aaa976abb7e094192360cf7 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 16 Jul 2019 10:55:17 +0200 Subject: [PATCH] udp translation adopted --- p4src/actions_delta_checksum.p4 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/p4src/actions_delta_checksum.p4 b/p4src/actions_delta_checksum.p4 index 1bce770..0a48541 100644 --- a/p4src/actions_delta_checksum.p4 +++ b/p4src/actions_delta_checksum.p4 @@ -70,8 +70,11 @@ action delta_prepare() action delta_udp_from_v4_to_v6() { - delta_prepare(); - hdr.udp.checksum = hdr.udp.checksum + meta.headerdiff; + v4sum(); + v6sum(); + + /* here is also a possible overflow in both directions */ + hdr.udp.checksum = hdr.udp.checksum + meta.v6sum - meta.v4sum; } action delta_tcp_from_v4_to_v6()