From dc35a7bc3a046c919af3a8e59d4dc796c4042abe Mon Sep 17 00:00:00 2001 From: Daniel Borkmann Date: Sat, 16 Mar 2013 19:18:03 +0100 Subject: [PATCH] trafgen: add csumicmp for ICMP checksum calculation Both, the IP and ICMP checksums use the same algorithm from RFC1071. Thus, it's enough if we give csumip an alias to csumicmp, so that it can be used in trafgen packet configurations. It's calculated from the ICMP header + data, with value 0 for this field. Suggested-by: Jon Schipp Signed-off-by: Daniel Borkmann --- trafgen_lexer.l | 2 ++ 1 file changed, 2 insertions(+) diff --git a/trafgen_lexer.l b/trafgen_lexer.l index 69caa581..72bd56c7 100644 --- a/trafgen_lexer.l +++ b/trafgen_lexer.l @@ -82,6 +82,8 @@ number_ascii ([a-zA-Z]) "rnd" { return K_RND; } "csumip" { return K_CSUMIP; } "csumip4" { return K_CSUMIP; } +"csumicmp" { return K_CSUMIP; } +"csumicmp4" { return K_CSUMIP; } "csumudp" { return K_CSUMUDP; } "csumtcp" { return K_CSUMTCP; } "drnd" { return K_DRND; } -- 2.11.4.GIT