#3460·go-libp2p

#3421 changes the contract of `AllAddrs` method to return all interface addrs and not just the primary interface

Author: sukunrtCreated Feb 2, 2026Updated Apr 17, 2026

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