CVSROOT:        /cvs
Module name:    src
Changes by:     flor...@cvs.openbsd.org 2019/11/27 10:12:32

Modified files:
        sbin/unwind    : resolver.c resolver.h 
        usr.sbin/unwindctl: unwindctl.c 

Log message:
Instead of only considering if a resolving strategy is dead, works or
validates, measure how well it is doing.

We keep track of the round trip median time of past queries and sort
strategies according to this in addition to the more basic qualities
of does it resolve and does it validate. If a query is not answered
within the median time the next best strategy gets a chance.  The most
prefered strategy (either from the config file or defaults) gets an
additional head start of 200ms.

A response of SERVFAIL also advances to the next best strategy. This
is helpful when the picked strategy can only see parts of the internet
but another strategy can reach more.

This alone gets us past quite a few captive portals already.
Additionally we doubt NXDOMAIN from anything but the stub resolver for
the first 5 minutes after a network change. This is probably as good
as the http check we had previously but more tests are needed.

This was inspired by RFC 8305, "Happy Eyeballs".

OK otto

Reply via email to