summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2013-03-16 19:18:03 +0100
committerDaniel Borkmann <dborkman@redhat.com>2013-03-16 19:18:03 +0100
commitdc35a7bc3a046c919af3a8e59d4dc796c4042abe (patch)
treed9fa1963405041c25a53babea9c8152317d369e0
parenta7b0ee3852e05dc92bb98971c09e271d4d7f245e (diff)
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 <jonschipp@gmail.com> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
-rw-r--r--trafgen_lexer.l2
1 files changed, 2 insertions, 0 deletions
diff --git a/trafgen_lexer.l b/trafgen_lexer.l
index 69caa58..72bd56c 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; }