Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When replaying at captured rate, tcpreplay does not respect timing for second packet #418

Closed
c-f-s-s opened this issue Sep 25, 2017 · 6 comments
Labels

Comments

@c-f-s-s
Copy link

c-f-s-s commented Sep 25, 2017

During some targeted testing which involved pcaps containing only a single TCP connection, I found that tcpreplay invariably generated the second packet pretty much immediately after the first, regardless of how much time difference there was between it and the first packet.

Tcpreplay seems to do a pretty good job of honoring the time deltas for the rest of the capture.

Setup info

FreeBSD 10.3-RELEASE amd64

Ethernet Converged Network Adapter X520-SR2

tcpreplay version: 4.2.6 (build git:)
Cache file supported: 04
Compiled against libdnet: 1.12
Compiled against libpcap: 1.4.0
64 bit packet counters: enabled
Verbose printing via tcpdump: enabled
Packet editing: disabled
Fragroute engine: enabled
Default injection method: bpf send()
Optional injection method: netmap

Reproduction info

Seems to reproduce regardless of whether or not I use the netmap drivers, and whether I use the system's 1Gb motherboard port or the Intel 10Gb nic.

Example:
sudo tcpreplay -i ix0 --netmap

@fklassen
Copy link
Member

@c-f-s-s sounds fairly serious. I'm planning to catch up with bugs next week, so I'll take a look.

@c-f-s-s
Copy link
Author

c-f-s-s commented Sep 25, 2017 via email

@fklassen
Copy link
Member

Have not been able to reproduce these issues in Linux. Will have to set up a FreeBSD environment that is using netmap. Will defer this and #419 until after 4.3 beta1

fklassen added a commit that referenced this issue Oct 22, 2018
fklassen added a commit that referenced this issue Oct 22, 2018
@fklassen
Copy link
Member

Fixed in PR #505

fklassen added a commit that referenced this issue Oct 23, 2018
* 4.3: (22 commits)
  Bug #418 don't ignore 2nd packet timing
  Bug #411 allow TAP on all platforms
  Bug #174 ensure --with-testnic does not affect replay
  Bug #406 change packet length to network order
  Bug #413 fix manpage typos
  Bug #485 Heap overflow fixed in #484
  Enhancement_#482 update CHANGELOG/CREDITS
  Enhancement_#482 test Makefile merge error fixup
  Enhancement_#482 test Makefile cleanup
  Bug #489 free after memcpy
  Bug #488 heap overflow csum replace4 (#496)
  Bug #486 CVE-2018-17974 realloc memory if packet size increases (#492)
  Enhancement #493 - fixes for Codacy identified issues
  Bug #486 Enforce max snaplen rather than doing realloc
  Bug #486 CVE-2018-17974 realloc memory if packet size increases
  Bug #484 CVE-2018-17582 Check for corrupt PCAP files
  4.3 - revert travis updates from merge
  Simplify plugin Makefiles
  allow out-of-tree build
  Remove dead code
  ...
fklassen added a commit that referenced this issue Oct 23, 2018
@fklassen
Copy link
Member

Fix warnings

@fklassen fklassen reopened this Oct 23, 2018
@fklassen
Copy link
Member

Close in favour of issue #506

fklassen added a commit that referenced this issue Oct 23, 2018
…ging

* 4.3: (36 commits)
  Enhancement #506 disable C99 and fix warnings (#507)
  Bug #418 don't ignore 2nd packet timing
  Bug #411 allow TAP on all platforms
  Bug #174 ensure --with-testnic does not affect replay
  Bug #406 change packet length to network order
  Bug #413 fix manpage typos
  Bug #485 Heap overflow fixed in #484
  Enhancement_#482 update CHANGELOG/CREDITS
  Enhancement_#482 test Makefile merge error fixup
  Enhancement_#482 test Makefile cleanup
  Bug #489 free after memcpy
  Bug #488 heap overflow csum replace4 (#496)
  Bug #486 CVE-2018-17974 realloc memory if packet size increases (#492)
  Enhancement #493 - fixes for Codacy identified issues
  Bug #486 Enforce max snaplen rather than doing realloc
  Bug #486 CVE-2018-17974 realloc memory if packet size increases
  Bug #484 CVE-2018-17582 Check for corrupt PCAP files
  4.3 - revert travis updates from merge
  Simplify plugin Makefiles
  allow out-of-tree build
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants