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

dnsdist: Ponder supporting TCP_FASTOPEN_KEY when available #9994

Closed
rgacogne opened this issue Jan 20, 2021 · 4 comments
Closed

dnsdist: Ponder supporting TCP_FASTOPEN_KEY when available #9994

rgacogne opened this issue Jan 20, 2021 · 4 comments

Comments

@rgacogne
Copy link
Member

  • Program: Authoritative, Recursor, dnsdist
  • Issue type: Feature request

Short description

Setting the TCP Fast Open key via TCP_FASTOPEN_KEY would allow accepting the same TFO cookie for all machines in a cluster (think anycast).

@Y7n05h
Copy link
Contributor

Y7n05h commented Mar 30, 2022

I will try to resolve the dnsdist part of this issue. This may take some time.

@Y7n05h
Copy link
Contributor

Y7n05h commented Apr 2, 2022

We need to set TCP_FASTOPEN_KEY via setsockopt . But how to generate a key? I guess this key needs a random number that is cryptographically secure. So we probably can't use rand() and random_engine from c or c++. Perhaps /dev/urandom could be used, I found code using them. I also noticed that there are some random number generation implementations in the current code, but I'm not sure if they can be used in scenarios where cryptographic security is required.

@rgacogne
Copy link
Member Author

rgacogne commented Apr 2, 2022

Since the goal is to be able to use the same key on multiple dnsdist instances, likely deployed in an anycast cluster, I think it makes sense to assume that the key will be provided by the administrator in dnsdist's configuration, a bit like setWHashedPertubation. So I wouldn't worry too much about generating the key, as it will very likely be generated outside of dnsdist.

@rgacogne
Copy link
Member Author

Implemented in #11497.

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

No branches or pull requests

2 participants