From owner-svn-ports-head@FreeBSD.ORG Fri Feb 7 08:35:24 2014 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 88710B9C; Fri, 7 Feb 2014 08:35:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 712EC1129; Fri, 7 Feb 2014 08:35:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s178ZOEj009610; Fri, 7 Feb 2014 08:35:24 GMT (envelope-from mandree@svn.freebsd.org) Received: (from mandree@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s178ZOv6009608; Fri, 7 Feb 2014 08:35:24 GMT (envelope-from mandree@svn.freebsd.org) Message-Id: <201402070835.s178ZOv6009608@svn.freebsd.org> From: Matthias Andree Date: Fri, 7 Feb 2014 08:35:24 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r343196 - in head/dns/dnsmasq-devel: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Feb 2014 08:35:24 -0000 Author: mandree Date: Fri Feb 7 08:35:23 2014 New Revision: 343196 URL: http://svnweb.freebsd.org/changeset/ports/343196 QAT: https://qat.redports.org/buildarchive/r343196/ Log: really add the promised AD flag patch. Pointy hat to: yours truly Added: head/dns/dnsmasq-devel/files/patch-git-e243c07-AD-flag-treatment (contents, props changed) Modified: head/dns/dnsmasq-devel/Makefile Modified: head/dns/dnsmasq-devel/Makefile ============================================================================== --- head/dns/dnsmasq-devel/Makefile Fri Feb 7 08:34:43 2014 (r343195) +++ head/dns/dnsmasq-devel/Makefile Fri Feb 7 08:35:23 2014 (r343196) @@ -4,7 +4,7 @@ PORTNAME= dnsmasq PORTVERSION= 2.69.0test6 DISTVERSION= 2.69test6 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= dns ipv6 MASTER_SITES= http://www.thekelleys.org.uk/dnsmasq/test-releases/ PKGNAMESUFFIX= -devel Added: head/dns/dnsmasq-devel/files/patch-git-e243c07-AD-flag-treatment ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/dns/dnsmasq-devel/files/patch-git-e243c07-AD-flag-treatment Fri Feb 7 08:35:23 2014 (r343196) @@ -0,0 +1,77 @@ +From e243c072b591cdeff8ac00483f5a9e426729534b Mon Sep 17 00:00:00 2001 +From: Simon Kelley +Date: Thu, 6 Feb 2014 18:14:09 +0000 +Subject: [PATCH] AD bit in queries handled as RFC6840 p5.7 + +--- + src/forward.c | 6 ------ + src/rfc1035.c | 17 ++++++++++------- + 2 files changed, 10 insertions(+), 13 deletions(-) + +diff --git a/src/forward.c b/src/forward.c +index 073b2c9..2088f98 100644 +--- ./src/forward.c ++++ ./src/forward.c +@@ -249,9 +249,6 @@ static int forward_query(int udpfd, union mysockaddr *udpaddr, + #endif + unsigned int gotname = extract_request(header, plen, daemon->namebuff, NULL); + +- /* RFC 4035: sect 4.6 para 2 */ +- header->hb4 &= ~HB4_AD; +- + /* may be no servers available. */ + if (!daemon->servers) + forward = NULL; +@@ -1283,9 +1280,6 @@ unsigned char *tcp_request(int confd, time_t now, + if ((checking_disabled = header->hb4 & HB4_CD)) + no_cache_dnssec = 1; + +- /* RFC 4035: sect 4.6 para 2 */ +- header->hb4 &= ~HB4_AD; +- + if ((gotname = extract_request(header, (unsigned int)size, daemon->namebuff, &qtype))) + { + #ifdef HAVE_AUTH +diff --git a/src/rfc1035.c b/src/rfc1035.c +index ac8c4ae..5515ea5 100644 +--- ./src/rfc1035.c ++++ ./src/rfc1035.c +@@ -1468,7 +1468,7 @@ size_t answer_request(struct dns_header *header, char *limit, size_t qlen, + struct mx_srv_record *rec; + size_t len; + +- /* Don't return AD set even for local data if checking disabled. */ ++ /* Don't return AD set if checking disabled. */ + if (header->hb4 & HB4_CD) + sec_data = 0; + +@@ -2260,17 +2260,20 @@ size_t answer_request(struct dns_header *header, char *limit, size_t qlen, + header->ancount = htons(anscount); + header->nscount = htons(0); + header->arcount = htons(addncount); ++ ++ /* RFC 6840 5.7 */ ++ if (header->hb4 & HB4_AD) ++ sec_reqd = 1; + + header->hb4 &= ~HB4_AD; ++ + len = ansp - (unsigned char *)header; + + if (have_pseudoheader) +- { +- len = add_pseudoheader(header, len, (unsigned char *)limit, 0, NULL, 0, sec_reqd); +- if (sec_reqd && sec_data) +- header->hb4 |= HB4_AD; +- +- } ++ len = add_pseudoheader(header, len, (unsigned char *)limit, 0, NULL, 0, sec_reqd); ++ ++ if (sec_reqd && sec_data) ++ header->hb4 |= HB4_AD; + + return len; + } +-- +1.7.2.5 +