mgen
mgen copied to clipboard
TCP retry waits are incorrect
Run the following with "retry -1/20" and nothing listening to port 6666 at the far end:
0 ON 10 TCP DST 192.168.1.101/6666 PERIODIC [1 400] COUNT 120
60.0 OFF 10
mgen: version 5.1.1
mgen: starting now ...
14:49:26.851824 START Mgen Version 5.1.1
14:49:26.852005 ON flow>10 srcPort>40697 dst>192.168.1.101/6666
14:49:40.853109 RECONNECT flow>10 srcPort>40697 dst>192.168.1.101/6666
14:49:54.854267 RECONNECT flow>10 srcPort>40697 dst>192.168.1.101/6666
14:50:08.855712 RECONNECT flow>10 srcPort>40697 dst>192.168.1.101/6666
14:50:22.857044 RECONNECT flow>10 srcPort>40697 dst>192.168.1.101/6666
14:50:36.858349 RECONNECT flow>10 srcPort>40697 dst>192.168.1.101/6666
14:50:50.859494 RECONNECT flow>10 srcPort>40697 dst>192.168.1.101/6666
The retries are 14 seconds apart. 20 decimal is 14 hexadecimal.
Change this to "retry -1/10" and the output is:
mgen: version 5.1.1
mgen: starting now ...
14:51:47.579320 START Mgen Version 5.1.1
14:51:47.579537 ON flow>10 srcPort>41967 dst>192.168.1.101/6666
i.e. no retries at all. 10 decimal is "a" hexadecimal.
Changing the other %x at line 1142 of common/mgenTransport.cpp to a %u fixes the problem. (See #56)
This has been fixed, let me know if you have issues.