#include <fcntl.h>
#include <netinet/in.h>
#include <poll.h>
-#include <stdio_ext.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/types.h>
goto fail;
if (is_new)
- log_debug("Found new link %i/%s", ifindex, l->name);
+ log_debug("Found new link %i/%s", ifindex, l->ifname);
break;
}
case RTM_DELLINK:
if (l) {
- log_debug("Removing link %i/%s", l->ifindex, l->name);
+ log_debug("Removing link %i/%s", l->ifindex, l->ifname);
link_remove_user(l);
link_free(l);
}
assert(si);
assert(m);
- f = open_memstream(&buffer, &size);
+ f = open_memstream_unlocked(&buffer, &size);
if (!f)
return log_oom();
- (void) __fsetlocking(f, FSETLOCKING_BYCALLER);
-
LIST_FOREACH(scopes, scope, m->dns_scopes)
dns_scope_dump(scope, f);
if (r < 0)
log_warning_errno(r, "Failed to parse configuration file: %m");
+#if ENABLE_DNS_OVER_TLS
+ r = dnstls_manager_init(m);
+ if (r < 0)
+ return r;
+#endif
+
r = sd_event_default(&m->event);
if (r < 0)
return r;
while (m->dns_streams)
dns_stream_unref(m->dns_streams);
+#if ENABLE_DNS_OVER_TLS
+ dnstls_manager_free(m);
+#endif
+
hashmap_free(m->links);
hashmap_free(m->dns_transactions);