-
Notifications
You must be signed in to change notification settings - Fork 295
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
Error when populating a MutableFragmentPacket #487
Comments
@johanmazelanssi this error still persistent or was it resolved in v0.29? |
I just recompiled the code above with rustc 1.60.0 and pnet 0.29. |
@johanmazelanssi okay, I'll take a look at it |
…e payload is at the end of the packet, github issue libpnet#487
@johanmazelanssi try this brach: https://github.com/infosechoudini/libpnet/tree/issue-487 it has your code in it |
Also, in you code, I modified the the following
|
I confirm that this branch fixes this problem. Thank you very much. I noticed another correctness problem that does impact this bug. |
@johanmazelanssi awesome! let me do a PR and get this merged |
I am using libpnet 0.27.2.
I get an error when I try to populate a MutableFragmentPacket.
For example with something like this.
I get an error on the line with "mutable_fragment_packet.populate(&fragment);".
When I check the backtrace, it looks like that the generated code that set the payload of an IPv6 fragment contains an assert that check that the payload is 0.
Here is the code that is generated on my machine:
I think like the len variable should not be set to 0, but to the complete size of the extension and the payload of the other extensions and upper protocols.
The text was updated successfully, but these errors were encountered: