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

Time-restricted asynchronous DNS [WIP] #435

Open
wants to merge 2 commits into
base: 1.1
Choose a base branch
from

Conversation

splitice
Copy link
Contributor

@splitice splitice commented Jun 10, 2023

Behaviour Changes:

  • Initial packet will fail if DNS is slow (20ms) to respond the DNS request will continue to be processed in the background
  • Any further packets after the first will only immediately check the status and will immediately fail if the DNS request has not completed yet
  • Requires pthreads (should we gate this and support the older sync method if the system does not support pthreads e.g windows?)
  • If a DNS lookup fails existing known host addresses are kept (I think this is better behaviour)

Remaining:

  • Code cleanup: Perhaps this should live in resolver.c as str2addrinfo_async & str2addrinfo_sync ?
  • Style

@splitice
Copy link
Contributor Author

@gsliepen @hg Any idea why the proxy test fails?

I can't see why myself. I purposefully did not change the proxy.c dns side of things as it should be a locally cached DNS entry and potentially better to be blocking in nature.

INFO:proxy.py:FINISHED TEST: HTTP CONNECT proxy
ERROR:proxy.py:Uncaught exception
Traceback (most recent call last):
  File "/__w/tinc/tinc/test/integration/proxy.py", line 464, in <module>
    check.greater(proxy_stats["tx"], 0)
  File "/__w/tinc/tinc/test/integration/testlib/check.py", line 64, in greater
    raise ValueError(f"value {value} must be greater than {than}")

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

Successfully merging this pull request may close these issues.

None yet

1 participant