Skip to content

Geneve SerializeTo improvements#9

Merged
mosajjal merged 2 commits intogopacket:masterfrom
mejedi:geneve_serialize_improvements
Oct 6, 2022
Merged

Geneve SerializeTo improvements#9
mosajjal merged 2 commits intogopacket:masterfrom
mejedi:geneve_serialize_improvements

Conversation

@mejedi
Copy link
Copy Markdown
Contributor

@mejedi mejedi commented Sep 30, 2022

No description provided.

We run the risk of panicing on buffer overflow if option lengths in the
packet are blindly trusted in serialization.

In line with the precedent set elsewhere (e.g. IPv4, TCP), compute the
necessary buffer size based on the actual options size.

Fill lengths fields from user-provided values, even if those are wrong.

Signed-off-by: Nick Zavaritsky <mejedi@gmail.com>
Signed-off-by: Nick Zavaritsky <mejedi@gmail.com>
@mosajjal
Copy link
Copy Markdown
Contributor

mosajjal commented Oct 2, 2022

hey thanks for this. can you provide a description of what this does and what current problem you've seen with the current code.

@mejedi
Copy link
Copy Markdown
Contributor Author

mejedi commented Oct 3, 2022

hey thanks for this. can you provide a description of what this does and what current problem you've seen with the current code.

This adds support for FixLengths option in SerializeTo. Please see commit messages for details.

@mosajjal
Copy link
Copy Markdown
Contributor

mosajjal commented Oct 5, 2022

thanks. is this ready to merge? happy to merge if so :)

@mejedi
Copy link
Copy Markdown
Contributor Author

mejedi commented Oct 6, 2022

This is ready. Thank you for reviewing.

@mosajjal mosajjal merged commit 9e6d99b into gopacket:master Oct 6, 2022
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.

2 participants