-
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes for Geneve option flags/length field (#17)
* Fix Geneve option flags/length field decoding The option header length is 5 bits, not 4, so fix the bit shift for decoding flags, and fix the mask for decoding the length. This also adds a unit test for decoding a max length option (124 byte payload). * Fix Geneve option flags/length field serialization OR-assigning the flag bits into the byte offset for the Geneve option header flags/length field produced corrupt packets because the buffer returned by PrependBytes is not guaranteed to be zeroed out. Since this is the first time that offset is touched, just assign instead. --------- Co-authored-by: Simeon Miteff <simeon.miteff@corelight.com>
- Loading branch information
1 parent
9e29b47
commit 4472aec
Showing
2 changed files
with
99 additions
and
3 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