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

mDNS discovery announces on the wrong interface #253

Closed
ghost opened this issue Dec 13, 2017 · 2 comments · Fixed by #1161
Closed

mDNS discovery announces on the wrong interface #253

ghost opened this issue Dec 13, 2017 · 2 comments · Fixed by #1161
Labels
kind/bug A bug in existing code (including security flaws)

Comments

@ghost
Copy link

ghost commented Dec 13, 2017

It seems like mDNS discovery only picks up the "first" interface that libp2p finds, i.e. usually the first one that's printed on ipfs startup. In my case, that's OpenVPN's tun0, but not the LAN's wifi0. Other interfaces aren't considered, so discovery is half broken in those cases.

We should probably apply some simple heuristics to decide which interfaces look like they're probably a LAN.

> IPFS_LOGGING=debug ipfs daemon |& grep mdns
@ghost ghost added the kind/bug A bug in existing code (including security flaws) label Dec 13, 2017
@ghost
Copy link
Author

ghost commented Dec 13, 2017

> IPFS_LOGGING=debug ipfs daemon |& grep mdns
16:11:09.294 DEBUG       mdns: starting mdns query mdns.go:130
16:11:09.295 DEBUG       mdns: Handling MDNS entry: 10.45.2.6:4001 QmZhKsV96AnqCynGhrygUuGRHsqdQY73yufXtdikkSZRy6 mdns.go:152
16:11:09.295 DEBUG       mdns: got our own mdns entry, skipping mdns.go:160
16:11:14.295 DEBUG       mdns: mdns query complete mdns.go:143

@djkazic
Copy link

djkazic commented Jun 22, 2020

👍 I've run into this as well, it's a problem on Android devices where a multiplexing interface may appear with an IP that isn't reachable from anything but the host device. When this address gets advertised, it's a bad time for mDNS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant