fix: use a source IP matching the querier's subnet when responding#460
fix: use a source IP matching the querier's subnet when responding#460keepsimple1 merged 2 commits intomainfrom
Conversation
|
We also should send announcements from every interface address. One more problem that even replying from right address we send all the interface addresses so other side should filter them. I believe the library must do the work either on a service side or a discoverer. Here is my patch (for me it works but obviously there are some corner cases that should be fixed): anti-social@e721f75 |
That's a good point. At the multicast (L2) layer, the listener should receive the announcement packets regardless the source address, but the IP layer might drop them. It's essentially same problem as the response case of this ticket.
I'm a bit worried about this. I cannot find a direct link, but I recall there has been some cases the publisher wants to include some address records that's not in the subnet, sometime even include the loopback address.
I'll take a closer look. Please feel free to convert it into a PR. (I can close mine later.) But maybe fix the response (and the announcement) case first, and deal with the addresses records question later in a separate PR? |
|
Possibly it is worth making an option for a discoverer to filter out unmatched IPs. In my case I show a list of found services to a user and it is annoying that there are addresses which are not connectable. Let's merge this PR and I'll try to create another one for announcements and IP filtering. |
|
Sounds good. Merged this one. Please go ahead. |
just checking if you still plan to work on that, or if need anything from me. |
It turned out a little trickier than I expected. Here it is: #462 . Tomorrow I'll try to glimpse at it one more time. |
This is to fix issue #459 .