socket path.
if(cfg->dnstap && cfg->dnstap_socket_path && cfg->dnstap_socket_path[0] &&
(cfg->dnstap_ip==NULL || cfg->dnstap_ip[0]==0)) {
- char* p = fname_after_chroot(cfg->dnstap_socket_path, cfg, 1);
- if(!p) {
- log_err("malloc failure");
- return NULL;
- }
+ char* p = cfg->dnstap_socket_path;
+ if(cfg->chrootdir && cfg->chrootdir[0] && strncmp(p,
+ cfg->chrootdir, strlen(cfg->chrootdir)) == 0)
+ p += strlen(cfg->chrootdir);
verbose(VERB_OPS, "attempting to connect to dnstap socket %s",
p);
check_socket_file(p);
- free(p);
}
env = (struct dt_env *) calloc(1, sizeof(struct dt_env));
dtio->is_bidirectional = cfg->dnstap_bidirectional;
if(dtio->upstream_is_unix) {
+ char* nm;
if(!cfg->dnstap_socket_path ||
cfg->dnstap_socket_path[0]==0) {
log_err("dnstap setup: no dnstap-socket-path for "
"socket connect");
return 0;
}
+ nm = cfg->dnstap_socket_path;
+ if(cfg->chrootdir && cfg->chrootdir[0] && strncmp(nm,
+ cfg->chrootdir, strlen(cfg->chrootdir)) == 0)
+ nm += strlen(cfg->chrootdir);
free(dtio->socket_path);
- dtio->socket_path = fname_after_chroot(cfg->dnstap_socket_path,
- cfg, 1);
+ dtio->socket_path = strdup(nm);
if(!dtio->socket_path) {
log_err("dnstap setup: malloc failure");
return 0;
+9 October 2020: Wouter
+ - Fix dnstap socket and the chroot not applied properly to the dnstap
+ socket path.
+
8 October 2020: Wouter
- Tag for 1.12.0 release.
- Current repo is version 1.12.1 in development.