-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 is squating on host hostname #176
Comments
@whyrusleeping mind taking a look? I've reached out to @Kubuxu but he was unsure. |
I guess we could try passing the peer ID as the 'hostname' there, that should work right? |
It needs to be a common thing across nodes, otherwise, they won't know whom to query. What about just |
I could imagine people running multiple IPFS nodes in a broadcast domain. Using |
Back in the 'old days', when ipfs mdns interop worked, this was what go-ipfs used to send as an answer to
Listening for queries on ipfs.local would be enough, then when replying, we can do -ipfs.local |
wait, if it needs to be common across nodes and we're setting it to |
It squats it
|
@diasdavid how can I reproduce this with js-ipfs? (I'm pretty sure I won't be able to reproduce it on Linux, can't change the hostname as unprivileged user.) |
any updates on this? |
I had a hard time reproducing it and moved to other things |
@lgierth you should be looking into reproducing it with go-ipfs, that is where I get it to happen, although I'm trying to reproduce it today and it is not happening (or at least not as fast), will continue investigating. |
@richardschneider you have done a lot of work towards fixing mdns in both js and go. Could you share an update here on the current status? Thank you in advance. |
https://github.com/libp2p/js-libp2p-mdns now uses There are no resources to work on the GO implementation, https://github.com/libp2p/js-libp2p-mdns. I'll update the JS readme to give an example query and response. |
In case someone finds this issue, the latest "mdns" discovery spec is at libp2p/specs/discovery/mdns.md |
I've been debugging why jsipfs and go-ipfs stopped finding each other since we got it to work (end of 2015).
It seems that couple of things have changed in go-ipfs, starting with the
serviceTag
and the really critical change,go-ipfs
now squats the host hostname to announce its records through mdns.See that https://github.com/libp2p/go-libp2p/blob/master/p2p/discovery/mdns.go#L85 passes
""
and then https://github.com/whyrusleeping/mdns/blob/master/zone.go#L83-L91This is the reason why I keep seeing my hostname change when I have an
ipfs daemon
running:What happens is that (by definition of the mdns protocol), once there is another announcer using the same hostname, one of them has to change.
Unless I'm missing something, I don't see a need to take over the host hostname.
PS: This 'fault' in the protocol is what enabled Watson to hack printers :) https://www.youtube.com/watch?v=BMWP20ZicsY
The text was updated successfully, but these errors were encountered: