MEDIUM: dns: extract options
DNS selection preferences are actually declared inline in the
struct server. There are copied from the server struct to the
dns_resolution struct for each resolution.
Next patchs adds new preferences options, and it is not a good
way to copy all the configuration information before each dns
resolution.
This patch extract the configuration preference from the struct
server and declares a new dedicated struct. Only a pointer to this
new striuict will be copied before each dns resolution.
diff --git a/include/types/server.h b/include/types/server.h
index 3e25c34..c04af9c 100644
--- a/include/types/server.h
+++ b/include/types/server.h
@@ -35,6 +35,7 @@
#include <types/connection.h>
#include <types/counters.h>
+#include <types/dns.h>
#include <types/freq_ctr.h>
#include <types/obj_type.h>
#include <types/proxy.h>
@@ -224,7 +225,7 @@
char *resolvers_id; /* resolvers section used by this server */
char *hostname; /* server hostname */
struct dns_resolution *resolution; /* server name resolution */
- int resolver_family_priority; /* which IP family should the resolver use when both are returned */
+ struct dns_options dns_opts;
#ifdef USE_OPENSSL
int use_ssl; /* ssl enabled */