summaryrefslogtreecommitdiff
path: root/trafgen.c
diff options
context:
space:
mode:
authorRadoslav Bodo <bodik@cesnet.cz>2018-06-19 21:57:37 +0200
committerTobias Klauser <tklauser@distanz.ch>2018-06-20 13:23:07 +0200
commit76bd307a8ce82d839037c7437c0d181890adde02 (patch)
tree86aac927b81d8a034f4ed535f5c4059282c2c77b /trafgen.c
parent50f8f250563c4f9e740f63b324e40a051230c68f (diff)
trafgen: support ICMPv6 checksums
Usage: csumicmp6(14, 54) Signed-off-by: Radoslav Bodo <bodik@cesnet.cz> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'trafgen.c')
-rw-r--r--trafgen.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/trafgen.c b/trafgen.c
index d9e0e0e..e628646 100644
--- a/trafgen.c
+++ b/trafgen.c
@@ -376,6 +376,12 @@ static void apply_csum16(int id)
(packets[id].len - csum->to),
IPPROTO_TCP);
break;
+ case CSUM_ICMP6:
+ sum = p6_csum((void *) packets[id].payload + csum->from,
+ packets[id].payload + csum->to,
+ (packets[id].len - csum->to),
+ IPPROTO_ICMPV6);
+ break;
default:
bug();
break;