summaryrefslogtreecommitdiff
path: root/trafgen.8
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2013-06-15 15:52:23 +0200
committerDaniel Borkmann <dborkman@redhat.com>2013-06-15 15:52:23 +0200
commit1f229a105e82ce5327035f9ff04f2e55001ed2f8 (patch)
tree77e228f1abed9dd1e48651be76fdf7ad9b8bf15e /trafgen.8
parent16e12faa29c0b86ea44956a193db4675fbf83ecb (diff)
trafgen: fix checksumming in trafgen example config
Took quite a while to git bisect the cause for the wrong TCP checksum in the -e example. It turned out that commit bf43e1993c7037 ("trafgen: lexer: return original string if no shellcode") "broke" it, since before that commit the TCP checksum from -e example was correct and afterwards not anymore. Well, it didn't break it. What was happening here is that with this fix above, the packet got 1 byte longer since the first character of the example string is not omitted anymore, therefore the checksum got wrong. Fix this by fixing the IP total length of the packet in the -e and man page example. The UDP example from the man page still works well if csumudp() is used, so not affected of this. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Diffstat (limited to 'trafgen.8')
-rw-r--r--trafgen.82
1 files changed, 1 insertions, 1 deletions
diff --git a/trafgen.8 b/trafgen.8
index f45a0c5..fb08cc0 100644
--- a/trafgen.8
+++ b/trafgen.8
@@ -257,7 +257,7 @@ taste of a more advanced example, run ''trafgen \-e'', fields are commented:
/* IPv4 Version, IHL, TOS */
0b01000101, 0,
/* IPv4 Total Len */
- c16(58),
+ c16(59),
/* IPv4 Ident */
drnd(2),
/* IPv4 Flags, Frag Off */