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

fix(phys-addr-length): fix physical address length mismatch #29

Merged
merged 2 commits into from
Nov 1, 2022

Conversation

maxosprojects
Copy link

@maxosprojects maxosprojects commented Nov 1, 2022

Fixes #28

Fix physical address length mismatch.

As can be seen on the screenshot, iface.HardwareAddr has 6 bytes and should match ifRow.PhysAddr. However, the length of ifRow.PhysAddr being 8 bytes prevents that, even though ifRow.PhysAddrLen says it should in fact be 6 bytes.
The change in this PR has a check to prevent unlikely "out of bounds" error, while respecting ifRow.PhysAddrLen.

image

separate gitignore change from PR
@willscott willscott merged commit c466fa2 into libp2p:master Nov 1, 2022
@maxosprojects maxosprojects deleted the fix-phys-addr-len-mismatch branch January 14, 2023 00:17
lixmal added a commit to netbirdio/netbird that referenced this pull request Mar 19, 2024
This fixes the test that doesn't find routes on Linux with the newer
version. Unfortunately we lose the windows bug fix from
libp2p/go-netroute#29 that returns interfaces
for us. It still works with returned next hop IP addresses currently.
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.

MAC Address Lookup Failed on Windows
2 participants