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

#50, incorrect cdir for ipv4 #51

Merged
merged 1 commit into from
Oct 15, 2024
Merged

#50, incorrect cdir for ipv4 #51

merged 1 commit into from
Oct 15, 2024

Conversation

bashkarev
Copy link
Contributor

No description provided.

netroute_bsd.go Outdated
@@ -26,11 +26,11 @@ func toIPAddr(a route.Addr) (net.IP, error) {
switch t := a.(type) {
case *route.Inet4Addr:
ip := net.IPv4(t.IP[0], t.IP[1], t.IP[2], t.IP[3])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth avoiding copying in and out of a 16 byte buffer by casting as net.IP(t.IP[0:4])?

@@ -0,0 +1,74 @@
package netroute
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this test is getting picked up on other platforms.

probably needs a
//go:build darwin || dragonfly || freebsd || netbsd || openbsd line?

@willscott willscott merged commit e0ac15a into libp2p:master Oct 15, 2024
9 checks passed
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