-
Notifications
You must be signed in to change notification settings - Fork 44
secondary server, mirage layer #347
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
Conversation
If there's a (Dns_server.Secondary.)timer-triggered connection request, do not infinitely try to connect (via request -> fail -> close -> request) in a tight loop, but cancel on first sight (the timer is responsible for re-connecting)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good. I have some suggestions.
I think the entire dns_server_mirage and dns_mirage logic may need an overhaul with a view on when which failures may arise, and how to properly handle them (to avoid such tight loops). maybe |
I think this improves the situation so I will merge. If there are unintended effects we can revisit. |
CHANGES: * dns-client (lwt, mirage): depend on happy-eyeballs-{lwt,mirage} instead of duplicating the code. This requires happy-eyeballs 1.1.0, and now the same Happy_eyeballs_{lwt,mirage}.t is used for DNS (connecting to the nameserver) and for the application (connecting to a remote host) (@dinosaure @hannesm mirage/ocaml-dns#346) * server: improve API documentation (@hannesm 1a80bd4080e597687152cf351d035ef5f00c5946 000ae02dfc477d91c05891e3891a447328ae448a) * server: add a `packet_callback` to `handle_packet` and `handle_buf` (@RyanGibb mirage/ocaml-dns#349) * server: expose `update_data` (@RyanGibb mirage/ocaml-dns#350) * resolver: b root name server IP change (@hannesm mirage/ocaml-dns#348) * secondary server [mirage]: avoid infinite loop in connect (avoids SYN floods) (@hannesm @reynir mirage/ocaml-dns#347) * resolver, dns_zone: use consistently `Log` instead of `Logs` (@palainp mirage/ocaml-dns#342)
CHANGES: * dns-client (lwt, mirage): depend on happy-eyeballs-{lwt,mirage} instead of duplicating the code. This requires happy-eyeballs 1.1.0, and now the same Happy_eyeballs_{lwt,mirage}.t is used for DNS (connecting to the nameserver) and for the application (connecting to a remote host) (@dinosaure @hannesm mirage/ocaml-dns#346) * server: improve API documentation (@hannesm 1a80bd4080e597687152cf351d035ef5f00c5946 000ae02dfc477d91c05891e3891a447328ae448a) * server: add a `packet_callback` to `handle_packet` and `handle_buf` (@RyanGibb mirage/ocaml-dns#349) * server: expose `update_data` (@RyanGibb mirage/ocaml-dns#350) * resolver: b root name server IP change (@hannesm mirage/ocaml-dns#348) * secondary server [mirage]: avoid infinite loop in connect (avoids SYN floods) (@hannesm @reynir mirage/ocaml-dns#347) * resolver, dns_zone: use consistently `Log` instead of `Logs` (@palainp mirage/ocaml-dns#342)
Release 8.0.0 CHANGES: * dns-client (lwt, mirage): depend on happy-eyeballs-{lwt,mirage} instead of duplicating the code. This requires happy-eyeballs 1.1.0, and now the same Happy_eyeballs_{lwt,mirage}.t is used for DNS (connecting to the nameserver) and for the application (connecting to a remote host) (@dinosaure @hannesm mirage#346) * server: improve API documentation (@hannesm 1a80bd4 000ae02) * server: add a `packet_callback` to `handle_packet` and `handle_buf` (@RyanGibb mirage#349) * server: expose `update_data` (@RyanGibb mirage#350) * resolver: b root name server IP change (@hannesm mirage#348) * secondary server [mirage]: avoid infinite loop in connect (avoids SYN floods) (@hannesm @reynir mirage#347) * resolver, dns_zone: use consistently `Log` instead of `Logs` (@palainp mirage#342)
If there's a (Dns_server.Secondary.)timer-triggered connection request, do not infinitely try to connect (via request -> fail -> close -> request) in a tight loop, but cancel on first sight (the timer is responsible for re-connecting)
I'm in the process of testing this in production.