[arch-commits] Commit in dnsmasq/trunk (2 files)

Dave Reisner dreisner at nymeria.archlinux.org
Wed Oct 30 15:22:56 UTC 2013


    Date: Wednesday, October 30, 2013 @ 16:22:56
  Author: dreisner
Revision: 198522

upgpkg: dnsmasq 2.67-2

- backport fix for local CNAME resolution failures

Added:
  dnsmasq/trunk/0001-Fix-check-for-local-domains-in-CNAME-case.-Fixes-d56.patch
Modified:
  dnsmasq/trunk/PKGBUILD

-----------------------------------------------------------------+
 0001-Fix-check-for-local-domains-in-CNAME-case.-Fixes-d56.patch |   49 ++++++++++
 PKGBUILD                                                        |    6 +
 2 files changed, 54 insertions(+), 1 deletion(-)

Added: 0001-Fix-check-for-local-domains-in-CNAME-case.-Fixes-d56.patch
===================================================================
--- 0001-Fix-check-for-local-domains-in-CNAME-case.-Fixes-d56.patch	                        (rev 0)
+++ 0001-Fix-check-for-local-domains-in-CNAME-case.-Fixes-d56.patch	2013-10-30 15:22:56 UTC (rev 198522)
@@ -0,0 +1,49 @@
+From 7b174c250df2bc97b503fd03b9e473998676b1a6 Mon Sep 17 00:00:00 2001
+From: Simon Kelley <simon at 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.4.2
+

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2013-10-30 15:22:36 UTC (rev 198521)
+++ PKGBUILD	2013-10-30 15:22:56 UTC (rev 198522)
@@ -5,7 +5,7 @@
 
 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 @@
 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 @@
   # 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() {




More information about the arch-commits mailing list