-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes interpreter data representation from Little to Big Endian.
Previously, it was thought that the interpreter stored data and did evaluations in Little Endian. The confusion originated from the nft binary's debug output, which is the primary artifact guiding the interpreter's implementation. The debug output of the nft binary prints data in Little Endian although the data is actually being stored in Big Endian. Since this is the only reference we have to implement the interpreter, other than the Linux kernel, we thought the data matched the debug output directly such that the interpreter's host representation was Little Endian. The mistake became clear when looking at the Linux kernel code for the byteorder operation and realizing the apparent inconsistencies. This also came with a few other changes as a result of switching endianness. Allows data of any number of bytes (0,16] Converts data in nftinterp from Little to Big Endian to account for the debug output's transformation. PiperOrigin-RevId: 668151185
- Loading branch information
1 parent
218f52a
commit 99745eb
Showing
4 changed files
with
128 additions
and
93 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
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
Oops, something went wrong.