-
Notifications
You must be signed in to change notification settings - Fork 1.1k
mDNS: packets are excessively large #5790
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
Comments
Thank you for opening the issue and for the detailed description! Those are very good points. Regarding 6.2 Responding to Address Queries: I wasn't able to find any prio discussion on this, neither in this repo, nor in go-libp2p or the specs. Still, I need to look into it some more. |
I came across a version of this. I've closed my issue in favor of this one (sorry, only noticed it too late). Though when sharing only the listener addresses, it might still blow up the packet when binding to |
This is more than just a packet size issue. I'm trying to run a node on Android, which uses MDNS. Since other nodes on the network keep reporting their loopback addresses, most of my outgoing dials error out because they go to loopback, and that's not the peer they expect. So, for this to be fixed either nodes need to quit reporting nonsense IPs over MDNS, or a I don't know why this issues is so prevalent on the Android node and doesn't occur between linux nodes |
Opened #6003. |
Uh oh!
There was an error while loading. Please reload this page.
Description
It would be great if the mDNS packet size could be reduced, they are currently very large, leading to multiple, fragmented IP packets. By default, an mDNS packet transmitted on one interface should maybe only contain addresses from this specific interface? The mDNS RFC6762, section 6.2 also says (even if rust-libp2p's reply is not strictly an mDNS response to an address query):
The implementation also currently violates RFC6762, section 17:
Also:
Motivation
While trying Qaul.net on our local Freifunk network we noticed that mDNS packets are very large, over
11004000 bytes. Example packet from an Android phone (which has one extra interface through using NetGuard).https://gist.github.com/T-X/19b5044df4c669306f1316555a6b8005
Currently this size typically breaks using the stateless multicast packet type in our mesh routing protocol batman-adv in our network. The fallback to batman-adv broadcast packets is in turn by default filtered by our firmware framework Gluon due to scalability concerns regarding broadcasts. (So partially self-induced, but still would be nice to reduce the size.
With more interfaces / addresses would also be easy to exceed a 1500 bytes MTU size, leading to IP fragmentation.)Another concern is privacy. The current approach might make it easy to figure out a person's location.
Current Implementation
In the current implementation IPv4/IPv6 unicast addresses from all interfaces are included in an mDNS packet transmitted by rust-libp2p. For my Android phone this were 11 addresses leading to 22 entries (x2 for TCP+UDP) in the mDNS packet of >4000 bytes size.
From interfaces:
(But somehow IPv6 link-local addresses are missing? Which would be the most reliable, stable one for link-local communication?)
Are you planning to do it yourself in a pull request?
No
Edit: Originally wrote they'd be >1100 bytes. Actually they are even >4000 bytes and already IP fragmented.
The text was updated successfully, but these errors were encountered: