This fixes a segmentation fault if the pcap is too small.#225
Open
sn0cr wants to merge 1 commit into
Open
Conversation
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.
Owner
|
Hmm, the root cause of this is something else; __ipairs shouldn't return nil buffers. |
Owner
|
Can you send me an example pcap to reproduce this? Or put it in your home directory on one of the persistent servers |
Contributor
|
Possibly related #240 |
|
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. |
Contributor
|
I sent @emmericp an example pcap via email. Hope it gets fixed soon. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)