MAJOR: server: add DNS-based server name resolution
Relies on the DNS protocol freshly implemented in HAProxy.
It performs a server IP addr resolution based on a server hostname.
diff --git a/src/standard.c b/src/standard.c
index 709db8b..4e458c2 100644
--- a/src/standard.c
+++ b/src/standard.c
@@ -25,6 +25,7 @@
#include <common/config.h>
#include <common/standard.h>
#include <types/global.h>
+#include <proto/dns.h>
#include <eb32tree.h>
/* enough to store NB_ITOA_STR integers of :
@@ -608,6 +609,9 @@
if (!resolve)
return NULL;
+ if (!dns_hostname_validation(str, NULL))
+ return NULL;
+
#ifdef USE_GETADDRINFO
if (global.tune.options & GTUNE_USE_GAI) {
struct addrinfo hints, *result;