do not exit in get_l2len_protocol() if l2len==0 #911
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.
When fussing with tcpreplay-edit
--fuzz-seed
option , it's possible to simulate the drop of a packet which causes get_l2len_protocol to see a packet with a l2_len=0.This does not remove the asserts because I think that those are useful in most cases where debugging the core of tcpreplay. This is just an edge case, and we won't have the asserts when using the released binary anyway.
Instead of aborting the whole process, let's just skip the packet.
You'll still have lots of warnings but I believe this is OK in such a scenario.