Update to 2.68 stable
Signed-off-by: Tomas Hozza <thozza@redhat.com>
This commit is contained in:
parent
fad2ab1eb0
commit
f828140df3
1
.gitignore
vendored
1
.gitignore
vendored
@ -15,3 +15,4 @@ dnsmasq-2.52.tar.lzma
|
||||
/dnsmasq-2.67rc4.tar.xz
|
||||
/dnsmasq-2.67.tar.xz
|
||||
/dnsmasq-2.68rc3.tar.xz
|
||||
/dnsmasq-2.68.tar.xz
|
||||
|
@ -1,49 +0,0 @@
|
||||
From 7b174c250df2bc97b503fd03b9e473998676b1a6 Mon Sep 17 00:00:00 2001
|
||||
From: Simon Kelley <simon@thekelleys.org.uk>
|
||||
Date: Mon, 28 Oct 2013 13:14:03 +0000
|
||||
Subject: [PATCH] Fix check for local domains in CNAME case. Fixes
|
||||
d56a604a9600c08d4a863527d549713c07f0186d
|
||||
|
||||
---
|
||||
src/cache.c | 2 +-
|
||||
src/rfc1035.c | 4 ++--
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/cache.c b/src/cache.c
|
||||
index d99aba6..6c5f601 100644
|
||||
--- a/src/cache.c
|
||||
+++ b/src/cache.c
|
||||
@@ -330,7 +330,7 @@ static int cache_scan_free(char *name, struct all_addr *addr, time_t now, unsign
|
||||
((flags & crecp->flags & F_TYPE) || ((crecp->flags | flags) & F_CNAME)) &&
|
||||
hostname_isequal(cache_get_name(crecp), name))
|
||||
{
|
||||
- if (crecp->flags & (F_HOSTS | F_DHCP))
|
||||
+ if (crecp->flags & (F_HOSTS | F_DHCP | F_CONFIG))
|
||||
return 0;
|
||||
*up = crecp->hash_next;
|
||||
cache_unlink(crecp);
|
||||
diff --git a/src/rfc1035.c b/src/rfc1035.c
|
||||
index fc6d09c..ff97576 100644
|
||||
--- a/src/rfc1035.c
|
||||
+++ b/src/rfc1035.c
|
||||
@@ -1221,7 +1221,7 @@ int check_for_local_domain(char *name, time_t now)
|
||||
struct naptr *naptr;
|
||||
|
||||
if ((crecp = cache_find_by_name(NULL, name, now, F_IPV4 | F_IPV6 | F_CNAME)) &&
|
||||
- (crecp->flags & (F_HOSTS | F_DHCP)))
|
||||
+ (crecp->flags & (F_HOSTS | F_DHCP | F_CONFIG)))
|
||||
return 1;
|
||||
|
||||
for (naptr = daemon->naptr; naptr; naptr = naptr->next)
|
||||
@@ -1861,7 +1861,7 @@ size_t answer_request(struct dns_header *header, char *limit, size_t qlen,
|
||||
if (qtype == T_CNAME || qtype == T_ANY)
|
||||
{
|
||||
if ((crecp = cache_find_by_name(NULL, name, now, F_CNAME)) &&
|
||||
- (qtype == T_CNAME || (crecp->flags & (F_HOSTS | F_DHCP))))
|
||||
+ (qtype == T_CNAME || (crecp->flags & (F_HOSTS | F_DHCP | F_CONFIG))))
|
||||
{
|
||||
ans = 1;
|
||||
if (!dryrun)
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,41 +0,0 @@
|
||||
From 532066ee2d7a4addd0af1a5f4ac0b8c3b5ad73cf Mon Sep 17 00:00:00 2001
|
||||
From: Simon Kelley <simon@thekelleys.org.uk>
|
||||
Date: Tue, 26 Nov 2013 10:14:47 +0000
|
||||
Subject: [PATCH] Add missing malloc() return-code check.
|
||||
|
||||
Signed-off-by: Tomas Hozza <thozza@redhat.com>
|
||||
---
|
||||
src/cache.c | 16 ++++++++--------
|
||||
1 file changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/src/cache.c b/src/cache.c
|
||||
index 582b882..43a7ce9 100644
|
||||
--- a/src/cache.c
|
||||
+++ b/src/cache.c
|
||||
@@ -945,15 +945,15 @@ void cache_reload(void)
|
||||
/* Add CNAMEs to interface_names to the cache */
|
||||
for (a = daemon->cnames; a; a = a->next)
|
||||
for (intr = daemon->int_names; intr; intr = intr->next)
|
||||
- if (hostname_isequal(a->target, intr->name))
|
||||
+ if (hostname_isequal(a->target, intr->name) &&
|
||||
+ ((cache = whine_malloc(sizeof(struct crec)))))
|
||||
{
|
||||
- struct crec *aliasc = whine_malloc(sizeof(struct crec));
|
||||
- aliasc->flags = F_FORWARD | F_NAMEP | F_CNAME | F_IMMORTAL | F_CONFIG;
|
||||
- aliasc->name.namep = a->alias;
|
||||
- aliasc->addr.cname.target.int_name = intr;
|
||||
- aliasc->addr.cname.uid = -1;
|
||||
- cache_hash(aliasc);
|
||||
- add_hosts_cname(aliasc); /* handle chains */
|
||||
+ cache->flags = F_FORWARD | F_NAMEP | F_CNAME | F_IMMORTAL | F_CONFIG;
|
||||
+ cache->name.namep = a->alias;
|
||||
+ cache->addr.cname.target.int_name = intr;
|
||||
+ cache->addr.cname.uid = -1;
|
||||
+ cache_hash(cache);
|
||||
+ add_hosts_cname(cache); /* handle chains */
|
||||
}
|
||||
|
||||
/* borrow the packet buffer for a temporary by-address hash */
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,5 +1,5 @@
|
||||
%define testrelease 0
|
||||
%define releasecandidate 1
|
||||
%define releasecandidate 0
|
||||
%if 0%{testrelease}
|
||||
%define extrapath test-releases/
|
||||
%define extraversion test16
|
||||
@ -13,7 +13,7 @@
|
||||
|
||||
Name: dnsmasq
|
||||
Version: 2.68
|
||||
Release: 0.1.%{?extraversion}%{?dist}
|
||||
Release: 1%{?extraversion}%{?dist}
|
||||
Summary: A lightweight DHCP/caching DNS server
|
||||
|
||||
Group: System Environment/Daemons
|
||||
@ -23,7 +23,6 @@ Source0: http://www.thekelleys.org.uk/dnsmasq/%{?extrapath}%{name}-%{vers
|
||||
Source1: %{name}.service
|
||||
|
||||
# Patches
|
||||
Patch0: %{name}-2.68-Add-missing-malloc-return-code-check.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
@ -58,7 +57,6 @@ query/remove a DHCP server's leases.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}%{?extraversion}
|
||||
%patch0 -p1
|
||||
|
||||
# use /var/lib/dnsmasq instead of /var/lib/misc
|
||||
for file in dnsmasq.conf.example man/dnsmasq.8 man/es/dnsmasq.8 src/config.h; do
|
||||
@ -139,6 +137,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_mandir}/man1/dhcp_*
|
||||
|
||||
%changelog
|
||||
* Mon Dec 09 2013 Tomas Hozza <thozza@redhat.com> - 2.68-1
|
||||
- Update to 2.68 stable
|
||||
|
||||
* Tue Nov 26 2013 Tomas Hozza <thozza@redhat.com> - 2.68-0.1.rc3
|
||||
- Update to 2.68rc3
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user