From 44e609bfa5bfd498fe5487ed9c53016e5052b827 Mon Sep 17 00:00:00 2001 From: Ben Draut Date: Tue, 29 May 2018 15:40:08 -0600 Subject: [PATCH] MINOR: dns: Implement `parse-resolv-conf` directive This introduces a new directive for the `resolvers` section: `parse-resolv-conf`. When present, it will attempt to add any nameservers in `/etc/resolv.conf` to the list of nameservers for the current `resolvers` section. [Mailing list thread][1]. [1]: https://www.mail-archive.com/haproxy@formilux.org/msg29600.html --- doc/configuration.txt | 6 +++ src/cfgparse.c | 115 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 120 insertions(+), 1 deletion(-) diff --git a/doc/configuration.txt b/doc/configuration.txt index e27d66627f..e901d7eeaf 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -12042,6 +12042,11 @@ nameserver : : IP address of the server : port where the DNS service actually runs +parse-resolv-conf + Adds all nameservers found in /etc/resolv.conf to this resolvers nameservers + list. Ordered as if each nameserver in /etc/resolv.conf was individually + placed in the resolvers section in place of this directive. + hold Defines during which the last name resolution should be kept based on last resolution @@ -12085,6 +12090,7 @@ timeout