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

Disallow resolving certain domains #278

Closed
AMythicDev opened this issue Nov 28, 2024 · 5 comments
Closed

Disallow resolving certain domains #278

AMythicDev opened this issue Nov 28, 2024 · 5 comments

Comments

@AMythicDev
Copy link

I have been using the ServiceDaemon to both publish and search a service, basically something like a peer to peer network. However one issue that I encounter is that the ServiceDaemon also resolves addresses that belongs to itself, which is basically pointless.

Although this may not seem much of a problem, but a solution to this problem can also be potentially extended to cases where we want to blacklist resolving certain hosts.

@keepsimple1
Copy link
Owner

However one issue that I encounter is that the ServiceDaemon also resolves addresses that belongs to itself, which is basically pointless.

When this happens, did you publish the service on the local host as well? If yes, it's expected to resolve the addresses that belong to the local host. If not, or if you think otherwise, could you please elaborate the details ?

@AMythicDev
Copy link
Author

AMythicDev commented Nov 30, 2024

did you publish the service on the local host as well?

Yes the publisher and querier live on the same device

I wanted to know if this is possible to ignore resolving certain addresses such as the local host without first resolving them.

Although reading the RFC 6763 more thoroughly I see it might not be possible. Still I am keeping this open for your comments.

@keepsimple1
Copy link
Owner

I wanted to know if this is possible to ignore resolving certain addresses such as the local host without first resolving them.

Although reading the RFC 6763 more thoroughly I see it might not be possible. Still I am keeping this open for your comments.

To me, it doesn't make sense to "ignore resolving certain addresses" in general. Like you probably noticed, it would not be compliant to RFC if ServiceDaemon does not resolve all instances and addresses available.

That said, for the specific case of resolving local addresses, we could try to disable IP_MULTICAST_LOOP via socket option. I've never used this option before, so will do some experiments.

@AMythicDev
Copy link
Author

To me, it doesn't make sense to "ignore resolving certain addresses" in general. Like you probably noticed, it would not be compliant to RFC if ServiceDaemon does not resolve all instances and addresses available.

Yeah I got that.

That said, for the specific case of resolving local addresses, we could try to disable IP_MULTICAST_LOOP via socket option. I've never used this option before, so will do some experiments.

Cool do let me know if you got any successes with that.

Anyways thanks for the response. I am closing this now.

@AMythicDev AMythicDev closed this as not planned Won't fix, can't repro, duplicate, stale Dec 3, 2024
@keepsimple1
Copy link
Owner

keepsimple1 commented Dec 7, 2024

@AMythicDev I got a chance to try out IP_MULTICAST_LOOP option, see PR #281 . From a simple test case, it seems working. Could you please try it out to see if it works for you? (even though this issue was closed).

Well, I spoke too soon. Looks like not working in Windows yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants