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: newServer for DoH endpoint fails silently at runtime #10771

Closed
Habbie opened this issue Sep 28, 2021 · 2 comments · Fixed by #10772
Closed

dnsdist: newServer for DoH endpoint fails silently at runtime #10771

Habbie opened this issue Sep 28, 2021 · 2 comments · Fixed by #10772

Comments

@Habbie
Copy link
Member

Habbie commented Sep 28, 2021

  • Program: dnsdist
  • Issue type: Bug report

Short description

Adding DoH backends at runtime while dnsdist.conf had no mention of DoH causes queries to silently be dropped.

Environment

  • Operating system: any
  • Software version: 1.7.0-alpha1
  • Software source: compiled myself

Steps to reproduce

  1. empty dnsdist.conf
  2. type newServer({address="9.9.9.9:443", tls="openssl", subjectName="dns.quad9.net", dohPath="/dns-query"}) into console
  3. attempt a query

Expected behaviour

query gets relayed to 9.9.9.9, answer gets relayed to me.

Actual behaviour

query gets silently dropped

Other information

newServer with a DoH endpoint bumps the number of DoH worker threads from 0 to 1, but as this happens after startup, that worked thread is never launched. Putting newServer in the config instead works. Putting setOutgoingDoHWorkerThreads in the config would probably also work.

I think we might want fixes in two places

  1. prevent (through errors, if necessary) the invalid state (i.e., if workerthreads=0, and newServer gets passed a DoH endpoint, error)
  2. be (somehow) slightly louder when dropping a query
@rgacogne
Copy link
Member

I'm pondering always starting a DoH worker when outgoing DoH support is available, unless setOutgoingDoHWorkerThreads is explicitly set to 0.

@Habbie
Copy link
Member Author

Habbie commented Sep 28, 2021

I'm pondering always starting a DoH worker when outgoing DoH support is available, unless setOutgoingDoHWorkerThreads is explicitly set to 0.

I like it.

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

Successfully merging a pull request may close this issue.

2 participants