From fb103eaf9ec5fe0bbdb089d2fc3005a93ce4901e Mon Sep 17 00:00:00 2001 From: DL6ER Date: Sun, 27 Jan 2019 10:11:13 +0100 Subject: [PATCH] Fix failed merge conflict resolution when adding dnsmasq v2.80 Signed-off-by: DL6ER --- dnsmasq/dhcp6.c | 2 +- dnsmasq/inotify.c | 1 + dnsmasq/network.c | 11 +++++------ dnsmasq/rfc1035.c | 4 ++-- dnsmasq/util.c | 1 - 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/dnsmasq/dhcp6.c b/dnsmasq/dhcp6.c index 4cb15633..91170430 100644 --- a/dnsmasq/dhcp6.c +++ b/dnsmasq/dhcp6.c @@ -668,7 +668,7 @@ static int construct_worker(struct in6_addr *local, int prefix, setaddr6part(&end6, addr6part(&template->end6)); for (context = daemon->dhcp6; context; context = context->next) - if ((context->flags & CONTEXT_TEMPLATE) && + if (!(context->flags & CONTEXT_TEMPLATE) && IN6_ARE_ADDR_EQUAL(&start6, &context->start6) && IN6_ARE_ADDR_EQUAL(&end6, &context->end6)) { diff --git a/dnsmasq/inotify.c b/dnsmasq/inotify.c index cff68f91..b76d9fd1 100644 --- a/dnsmasq/inotify.c +++ b/dnsmasq/inotify.c @@ -237,6 +237,7 @@ int inotify_check(time_t now) (in->name[0] == '#' && in->name[namelen - 1] == '#') || in->name[0] == '.') continue; + for (res = daemon->resolv_files; res; res = res->next) if (res->wd == in->wd && strcmp(res->file, in->name) == 0) hit = 1; diff --git a/dnsmasq/network.c b/dnsmasq/network.c index 7f90cd78..f0c53acf 100644 --- a/dnsmasq/network.c +++ b/dnsmasq/network.c @@ -1571,8 +1571,7 @@ void check_servers(void) else if (strlen(serv->domain) == 0) s1 = _("default"), s2 = ""; else - //s1 = _("domain"), s2 = serv->domain; - continue; + s1 = _("domain"), s2 = serv->domain; if (serv->flags & SERV_NO_ADDR) { @@ -1596,10 +1595,10 @@ void check_servers(void) } } - // if (locals > LOCALS_LOGGED) - // my_syslog(LOG_INFO, _("using %d more local addresses"), locals - LOCALS_LOGGED); - // if (count - 1 > SERVERS_LOGGED) - // my_syslog(LOG_INFO, _("using %d more nameservers"), count - SERVERS_LOGGED - 1); + if (locals > LOCALS_LOGGED) + my_syslog(LOG_INFO, _("using %d more local addresses"), locals - LOCALS_LOGGED); + if (count - 1 > SERVERS_LOGGED) + my_syslog(LOG_INFO, _("using %d more nameservers"), count - SERVERS_LOGGED - 1); /* Remove unused sfds */ for (sfd = daemon->sfds, up = &daemon->sfds; sfd; sfd = tmp) diff --git a/dnsmasq/rfc1035.c b/dnsmasq/rfc1035.c index d62d84a7..8825a5cc 100644 --- a/dnsmasq/rfc1035.c +++ b/dnsmasq/rfc1035.c @@ -1725,8 +1725,8 @@ size_t answer_request(struct dns_header *header, char *limit, size_t qlen, nxdomain = 1; if (!dryrun) { - log_query(crecp->flags, name, NULL, record_source(crecp->uid)); - FTL_cache(crecp->flags, name, NULL, record_source(crecp->uid), daemon->log_display_id); + log_query(crecp->flags, name, NULL, NULL); + FTL_cache(crecp->flags, name, NULL, NULL, daemon->log_display_id); } } else diff --git a/dnsmasq/util.c b/dnsmasq/util.c index bcde1907..3b725cc5 100644 --- a/dnsmasq/util.c +++ b/dnsmasq/util.c @@ -294,7 +294,6 @@ void safe_strncpy(char *dest, const char *src, size_t size) } } - void safe_pipe(int *fd, int read_noblock) { if (pipe(fd) == -1 ||