Usually in configuration the module is loaded in a separate command
from passing configuration to it. For dnstap this loading would
immediately lead to opening the default socket path, even if the
configuration actually specifies (a different) path later.
Users can still force using the default by passing an empty table:
`dnstap.config({})` or `modules = { dnstap = {}}`
(though I doubt the utility of the default /tmp/dnstap.sock anyway)
KR_EXPORT
int dnstap_config(struct kr_module *module, const char *conf) {
dnstap_clear(module);
+ if (!conf) return kr_ok(); /* loaded module without configuring */
struct dnstap_data *data = module->data;
auto_free char *sock_path = NULL;
/* Empty conf passed, set default */
- if (!conf || strlen(conf) < 1) {
+ if (strlen(conf) < 1) {
sock_path = strdup(DEFAULT_SOCK_PATH);
} else {