Moved configuration from resolver manager to unbound plugin

Also streamlined log messages in unbound plugin.
This commit is contained in:
Andreas Steffen
2013-02-19 12:25:00 +01:00
committed by Tobias Brunner
parent 95650c0836
commit f2145c8d3a
7 changed files with 47 additions and 52 deletions
+2 -9
View File
@@ -24,16 +24,9 @@
typedef struct resolver_t resolver_t;
/**
* Constructor function which creates resolver instances.
*
* Creates a new DNS resolver with settings from the file resolv_conf and
* keys from the file ta_file as DNSSEC trust anchor.
*
* @param resolv_conf path to the file resolv.conf
* @param ta_file path to a file with the DNSSEC trust anchors
* @return resolver instance
* Constructor function which creates DNS resolver instances.
*/
typedef resolver_t* (*resolver_constructor_t)(char *resolv_conf, char *ta_file);
typedef resolver_t* (*resolver_constructor_t)(void);
#include <resolver/resolver_response.h>
#include <resolver/rr_set.h>
+1 -14
View File
@@ -56,20 +56,7 @@ METHOD(resolver_manager_t, remove_resolver, void,
METHOD(resolver_manager_t, create, resolver_t*,
private_resolver_manager_t *this)
{
char *resolv_conf;
char *trust_anchor_file;
resolv_conf = lib->settings->get_str(lib->settings,
"libstrongswan.plugins.resolver."
"resolv_conf",
"/etc/resolv.conf");
trust_anchor_file = lib->settings->get_str(lib->settings,
"libstrongswan.plugins.resolver."
"trust_anchor",
"/etc/trust.anchors");
return this->constructor(resolv_conf, trust_anchor_file);
return this->constructor();
}
METHOD(resolver_manager_t, destroy, void,