-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
Support multiple IP addresses per interface #77
Comments
This is really mind boggling. Tried the same setup on my PC, and mdnsd could handle multiple addresses just fine. It's as if the multicast packets are bouncing around in my network. 🫣😵💫 |
Or rather, the mdns packets are sent to the network from the interface, as well back onto itself! But only on my embedded device. It's as if IP_MULTICAST_LOOP is enabled and mdnsd does not recognize the sender address (its own address). Right now I feel like I'm rubber ducking myself on your issue page, sorry about that. You might have a clue what's going on. Either way I think I have a lead to what I should focus my debugging efforts on on Monday. 😬 |
I have no idea what could be going on here. The hostname in your logs rings familiar though, knowing it's a switch-based embedded platform, are you sure the frames are not looped back from the switchcore? You can test the theory by running tcpdump on the lower-level port interfaces or inspecting the RMON counters for multicast in/out. |
Thanks for the tip! It will be fun figuring this out! |
So, now that it's not Friday and my brain is a bit less fried, it seems like my issue has been fixed in 0.12. |
He he, OK 😏 |
I think I may have to reopen this issue. I think in fact there is a bug in mdnsd with respect to multiple IP addresses per interface. Here's my reasoning:
It's odd that the source address of the packet going out from mdnsd is the first address of the interface, but the bound address of the multicast socket seem to be the last address of the interface. I can't really comment on this behavior, or if it's a proper behavior of the system. One solution to this particular problem would be keeping a list of all interface addresses and compare against the list in 3. Not sure if that's a proper solution though if my system is behaving badly. Do you have any thoughts about this? |
(I've tested and debugged this on 1.12 by the way) |
I think that what I'm saying is that:
These addresses don't always match, and that causes mdnsd to think there are conflicts when it sees its own packets. |
Hmm, yeah that makes sense. We could do a better job of that. Unfortunately I don't have the time (or energy) at the moment to help out. Maybe someone else who has been active recently in the project is interested? |
I'm actually trying to fix it right now, but with limited success. Limitations set by too much caffeine. 🥴 I thought I had a solution for it, but I fail to grok the mark and sweep stuff. In my eyes, it has no effect, but I'm sure I've missed something. The mark and sweep algorithm is now also a different beast, as the changes I'm working with has changed the interface:address ratio from 1:1 to 1:n. I'll give it a go again tomorrow once this caffeine overload has simmered... |
The setup:
vlan1
192.168.2.200
169.254.29.54
(link local addressmdnsd sends out a query for its own services, presumably to avoid conflicts. The queries have the source address
169.254.29.54:5353
and destination224.0.0.251:5353
. mdnsd somehow responds to its own query, and it says it has the IP-address192.168.2.200
. The response however has the source address169.254.29.54:5353
.The log files are filled with messages like these:
If I drop either address from the interface, it has no problems.
The text was updated successfully, but these errors were encountered: