Moved configuration from resolver manager to unbound plugin
Also streamlined log messages in unbound plugin.
This commit is contained in:
committed by
Tobias Brunner
parent
95650c0836
commit
f2145c8d3a
@@ -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>
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user