]> Cypherpunks repositories - gostls13.git/commit
net: respect resolv.conf rotate option
authorDan Peterson <dpiddy@gmail.com>
Thu, 15 Sep 2016 20:24:42 +0000 (17:24 -0300)
committerMatthew Dempsky <mdempsky@google.com>
Sat, 17 Sep 2016 00:34:19 +0000 (00:34 +0000)
commita1bf203b57ab854f2c1b7668ae96bc34e60e02fc
tree662a0e5b8a3be9c43a31b07fd03c75620621cc5f
parentf7e49f6644bde3f17b4a795218a35876347455a1
net: respect resolv.conf rotate option

Instead of ranging over servers in the config, grab an offset
from the config that is used to determine indices.

When the rotate option is enabled, the offset increases which
rotates queries through servers. Otherwise, it is always 0
which uses servers in config order.

Fixes #17126

Change-Id: If233f6de7bfa42f88570055b9ab631be08a76b3e
Reviewed-on: https://go-review.googlesource.com/29233
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/net/dnsclient_unix.go
src/net/dnsclient_unix_test.go
src/net/dnsconfig_unix.go