#3421 changes the contract of `AllAddrs` method to return all interface addrs and not just the primary interface
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 6.9k
- Forks
- 1.3k
- Avg merge
- 13d 21h
- Merged PRs (30d)
- 1
Description
This breaks the `AllAddrs` method which was previously only returning the 'primary' interface and now returns all interface addrs.
The problem is that the new netroute implementation fails when we query `0.0.0.0` while the previous one returned the primary(default) interface. To be clear just removing the early error in netroute code wont fix this because then the os will return 127.0.0.1 as the interface because it considers 0.0.0.0 to be localhost. https://github.com/libp2p/go-netroute/blob/master/netroute_linux.go#L42
We've inadvertently ended up implementing https://github.com/libp2p/go-libp2p/issues/3076
_Originally posted by @sukunrt in https://github.com/libp2p/go-libp2p/issues/3421#issuecomment-3834531530_
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the AllAddrs method and inspect go-netroute's netroute_linux.go around line 42, then read issue #3076 for the intended behavior. Reproduce the 0.0.0.0 lookup and compare it with the previous primary-interface behavior; done means the default lookup no longer fails or incorrectly selects 127.0.0.1.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100