Skip to content
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

Implement set KeyByteOrder #226

Merged
merged 1 commit into from
May 18, 2023
Merged

Conversation

turekt
Copy link
Contributor

@turekt turekt commented May 16, 2023

Hi,

this PR reverts PR #180 and introduces KeyByteOrder field to sets to allow lib users to specify key byte order. PR #180 was a change that introduced a default userdata TLV that specifies key endianess and was implemented to fix issue #177 and conform to main nftables C implementation. This obviously broke setting IPs to sets and there is no other way for users to specify which byte order should be used. Therefore, this change now allows specifying key byte order and should be backwards compatible since not specifying KeyByteOrder will marshal bytes as it would prior to PR #180.

With this, issue #225 should be fixed. Issue #177 remains, but can now be fixed by specifying s.KeyByteOrder = binaryutil.NativeEndian.

Let me know what you think.

Fixes google#225
Introduced KeyByteOrder in sets which fills UDATA with endianess information
@stapelberg stapelberg merged commit d746ecb into google:main May 18, 2023
@stapelberg
Copy link
Collaborator

Thanks for the fix!

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