From c7a3571cf60edf8bbc0b5caa0440d85979e8481b Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Thu, 24 Dec 2009 00:17:47 +0000 Subject: [PATCH] 2818. [cleanup] rndc could return an incorrect error code when a zone was not found. [RT #20767] --- CHANGES | 3 +++ bin/named/server.c | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index fab6e40bd2..a65e65d2a3 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +2818. [cleanup] rndc could return an incorrect error code + when a zone was not found. [RT #20767] + 2815. [bug] Exclusively lock the task when freezing a zone. [RT #19838] diff --git a/bin/named/server.c b/bin/named/server.c index 2b61d90263..b9259c71a7 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: server.c,v 1.520.12.10 2009/12/23 23:34:16 each Exp $ */ +/* $Id: server.c,v 1.520.12.11 2009/12/24 00:17:47 each Exp $ */ /*! \file */ @@ -4337,6 +4337,8 @@ zone_from_args(ns_server_t *server, char *args, dns_zone_t **zonep) { /* Partial match? */ if (result != ISC_R_SUCCESS && *zonep != NULL) dns_zone_detach(zonep); + if (result == DNS_R_PARTIALMATCH) + result = ISC_R_NOTFOUND; fail1: return (result); }