-
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Geneve SerializeTo improvements (#9)
* geneve: Fix crash in SerializeTo when lengths are wrong 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> * geneve: support FixLengths option in SerializeTo Signed-off-by: Nick Zavaritsky <mejedi@gmail.com> Signed-off-by: Nick Zavaritsky <mejedi@gmail.com>
- Loading branch information
Showing
2 changed files
with
106 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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