Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Investigate if its safe to reuse request for recursive DNS #1113

Closed
tomwilkie opened this issue Jul 10, 2015 · 4 comments
Closed

Investigate if its safe to reuse request for recursive DNS #1113

tomwilkie opened this issue Jul 10, 2015 · 4 comments
Assignees
Milestone

Comments

@tomwilkie
Copy link
Contributor

I'm not sure you can just send the same request we get from the client to the upstream server. This could lead to a conflict if two clients send a request with the same message ID. I would make a copy...

@tomwilkie
Copy link
Contributor Author

Just checked the dns code, and we should be making a copy and giving it a fresh id. We can use dns.Id() to generate fresh ids.

@rade
Copy link
Member

rade commented Sep 3, 2015

What would the user-visible impact of an ID clash be?

@tomwilkie
Copy link
Contributor Author

If two clients happened to send requests to us with the same id but for different hostnames, and we sent the request upstream as is, there is a chance we might mix up the replies from upstream and send the wrong reply back to the wrong client.

@rade
Copy link
Member

rade commented Feb 9, 2016

@tomwilkie AFAICT the DNS code does not correlate replies by ID. A fresh UDP/TCP "connection" is established for every request, so correlation happens by virtue of receiving replies on distinct ephemeral ports. The library checks that the reply ID matches the request but only to error when it doesn't.

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

No branches or pull requests

2 participants