use Go 1.21's binary.NativeEndian#220
Merged
mdlayher merged 1 commit intomdlayher:mainfrom Jan 13, 2025
Merged
Conversation
bradfitz
added a commit
to tailscale/tailscale
that referenced
this pull request
Jan 13, 2025
We still use josharian/native (hi @josharian!) via netlink, but I also sent mdlayher/netlink#220 Updates #8632 Change-Id: I2eedcb7facb36ec894aee7f152c8a1f56d7fc8ba Signed-off-by: Brad Fitzpatrick <[email protected]>
bradfitz
added a commit
to tailscale/tailscale
that referenced
this pull request
Jan 13, 2025
We still use josharian/native (hi @josharian!) via netlink, but I also sent mdlayher/netlink#220 Updates #8632 Change-Id: I2eedcb7facb36ec894aee7f152c8a1f56d7fc8ba Signed-off-by: Brad Fitzpatrick <[email protected]>
Signed-off-by: Brad Fitzpatrick <[email protected]>
712c69f to
8b56e10
Compare
Contributor
Author
|
Fixed the CI failure (I hope)... there were two 1.18 references I'd missed. |
bradfitz
added a commit
to tailscale/tailscale
that referenced
this pull request
Jan 13, 2025
We still use josharian/native (hi @josharian!) via netlink, but I also sent mdlayher/netlink#220 Updates #8632 Change-Id: I2eedcb7facb36ec894aee7f152c8a1f56d7fc8ba Signed-off-by: Brad Fitzpatrick <[email protected]>
Owner
|
No worries. Clearly I haven't had to touch things much here in a while! |
thirdeyenick
pushed a commit
to ninech/tailscale
that referenced
this pull request
Jul 2, 2025
We still use josharian/native (hi @josharian!) via netlink, but I also sent mdlayher/netlink#220 Updates tailscale#8632 Change-Id: I2eedcb7facb36ec894aee7f152c8a1f56d7fc8ba Signed-off-by: Brad Fitzpatrick <[email protected]>
SuperQ
added a commit
to SuperQ/netlink
that referenced
this pull request
Aug 25, 2025
- [Improvement]: Updated dependencies, test with Go 1.23 to 1.25. - [Improvement]: Use Go 1.21's binary.NativeEndian (mdlayher#220) - [Improvement]: Expose socket ReadBuffer & WriteBuffer functions (mdlayher#223) Signed-off-by: SuperQ <[email protected]>
Merged
mdlayher
pushed a commit
that referenced
this pull request
Aug 25, 2025
- [Improvement]: Updated dependencies, test with Go 1.23 to 1.25. - [Improvement]: Use Go 1.21's binary.NativeEndian (#220) - [Improvement]: Expose socket ReadBuffer & WriteBuffer functions (#223) Signed-off-by: SuperQ <[email protected]>
dswarbrick
reviewed
Aug 26, 2025
|
|
||
| func skipBigEndian(t *testing.T) { | ||
| if binary.ByteOrder(native.Endian) == binary.BigEndian { | ||
| if binary.ByteOrder(binary.NativeEndian) == binary.BigEndian { |
Contributor
There was a problem hiding this comment.
This does not work as intended.
cf.
if binary.ByteOrder(binary.NativeEndian) == binary.BigEndian {
fmt.Println("Arch is big-endian")
} else if binary.ByteOrder(binary.NativeEndian) == binary.LittleEndian {
fmt.Println("Arch is little-endian")
} else {
fmt.Println("Endianness unknown")
}Output:
Endianness unknown
Contributor
|
I'm not sure yet why, but this PR also caused a regression in bigendian tests on github.com/jsimonetti/rtnetlink that were previously working with github.com/mdlayer/netlink v1.7.2 |
Contributor
|
Ok, found it. github.com/jsimonetti/rtnetlink also has a test helper to skip test on bigendian, and it relies on jsimonetti/rtnetlink/address_test.go: func skipBigEndian(t *testing.T) {
if nlenc.NativeEndian() == binary.BigEndian {
t.Skip("skipping test on big-endian system")
}
}So that fails for the same reason as I outlined in #227 (comment) |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.