borkmann/netsniff-ng — pull request #60 by jonschipp (2013-03-12 23:14:56+00:00)
Title: trafgen: example (-e) has 1 truncated byte

Used: cd trafgen && ./trafgen -e tcp | ./trafgen --in - --out lo --num 1 --cpp

Fresh clone from borkmann/netsniff-ng:

$tcpdump -XXevvvnni lo

16:07:53.192235 00:02:b3:c5:41:63 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 72:
...
truncated-ip - 1 bytes missing! <---------
(tos 0x0, ttl 64, id 4423, offset 0, flags [DF], proto TCP (6), length 59)
231.17.243.41.7217 > 8.123.78.205.80: Flags [SE], seq 2006068992:2006068999, win
...

After my change:
$ tcpdump -XXevvvnni lo
...
16:06:47.269788 00:02:b3:34:ee:cb > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 72: (tos 0x0, ttl 64, id 60139, offset 0, flags [DF], proto TCP (6), length 58)
148.209.24.120.34421 > 245.210.33.187.80: Flags [SE], cksum 0x0081 (correct), seq
...