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

This fixes a segmentation fault if the pcap is too small. #225

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sn0cr
Copy link

@sn0cr sn0cr commented Aug 17, 2018

Hi @emmericp,

during my testing with small pcaps (containing only the TCP handshake) I found that the replay-pcap example crashes Moongen with a SegFault. With this change this should not happen (at least this is the simplest change to mitigate it)

The buffer is nil if the pcap file was already fully replayed.
Thus the moongen script crashes if it is not a multiple of the
buffers in size. With this commit this should be fixed.
@emmericp
Copy link
Owner

Hmm, the root cause of this is something else; __ipairs shouldn't return nil buffers.

@emmericp
Copy link
Owner

Can you send me an example pcap to reproduce this? Or put it in your home directory on one of the persistent servers

@holzingk
Copy link
Contributor

holzingk commented Apr 4, 2019

Possibly related #240

@shuwens
Copy link

shuwens commented Jul 1, 2019

I can confirm that this patch/PR is required for replaying a pcap trace in rate limiting mode to work. Not sure about the size part tho. The trace I am using is 100M.

@holzingk
Copy link
Contributor

I sent @emmericp an example pcap via email. Hope it gets fixed soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants