From b2a6f1b28b7fa31088cab9a90b0f5ab97948534d Mon Sep 17 00:00:00 2001 From: root Date: Thu, 31 Oct 2013 01:12:24 -0700 Subject: Thu Oct 31 01:09:50 PDT 2013 --- ...or-local-domains-in-CNAME-case.-Fixes-d56.patch | 49 ++++++++++++++++++++++ extra/dnsmasq/PKGBUILD | 8 +++- 2 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 extra/dnsmasq/0001-Fix-check-for-local-domains-in-CNAME-case.-Fixes-d56.patch (limited to 'extra/dnsmasq') diff --git a/extra/dnsmasq/0001-Fix-check-for-local-domains-in-CNAME-case.-Fixes-d56.patch b/extra/dnsmasq/0001-Fix-check-for-local-domains-in-CNAME-case.-Fixes-d56.patch new file mode 100644 index 000000000..866b3e8d9 --- /dev/null +++ b/extra/dnsmasq/0001-Fix-check-for-local-domains-in-CNAME-case.-Fixes-d56.patch @@ -0,0 +1,49 @@ +From 7b174c250df2bc97b503fd03b9e473998676b1a6 Mon Sep 17 00:00:00 2001 +From: Simon Kelley +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.4.2 + diff --git a/extra/dnsmasq/PKGBUILD b/extra/dnsmasq/PKGBUILD index e90179183..fc54009ac 100644 --- a/extra/dnsmasq/PKGBUILD +++ b/extra/dnsmasq/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 197411 2013-10-25 14:32:42Z dreisner $ +# $Id: PKGBUILD 198525 2013-10-30 15:23:36Z dreisner $ # Maintainer: Dave Reisner # Contributor: Paul Mattal # Contributor: Tom Newsom pkgname=dnsmasq pkgver=2.67 -pkgrel=1 +pkgrel=2 pkgdesc="Lightweight, easy to configure DNS forwarder and DHCP server" url="http://www.thekelleys.org.uk/dnsmasq/doc.html" arch=('i686' 'x86_64') @@ -14,8 +14,10 @@ depends=('glibc' 'dbus-core') install=$pkgname.install backup=('etc/dnsmasq.conf') source=("http://www.thekelleys.org.uk/$pkgname/$pkgname-$pkgver.tar.xz" + '0001-Fix-check-for-local-domains-in-CNAME-case.-Fixes-d56.patch' 'dnsmasq.service') md5sums=('3560068c6cc644a01924fa089a70bb9c' + '38bcc0c2b8dbc480e58a3478cae34bf6' '7ac45726cabef4145db40d758cc7fedf') prepare() { @@ -24,6 +26,8 @@ prepare() { # link against dbus. this ugliness is needed to ensure that the # compile time opts report properly on startup. yuck. sed -i '/^#ifdef DNSMASQ_COMPILE_OPTS/ i#define HAVE_DBUS' src/config.h + + patch -Np1 <"$srcdir/0001-Fix-check-for-local-domains-in-CNAME-case.-Fixes-d56.patch" } build() { -- cgit v1.2.3-54-g00ecf