1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-30 18:13:54 +08:00

dont advertise loopback address over mdns

This commit is contained in:
Jeromy
2015-04-28 22:08:46 -07:00
parent d047fe4fcb
commit 04f773166f

View File

@ -44,6 +44,9 @@ type mdnsService struct {
func getDialableListenAddr(ph host.Host) (*net.TCPAddr, error) {
for _, addr := range ph.Addrs() {
if manet.IsIPLoopback(addr) {
continue
}
na, err := manet.ToNetAddr(addr)
if err != nil {
continue