Orphaned CNAME Records

Mark_Andrews at isc.org Mark_Andrews at isc.org
Thu Sep 18 14:01:20 UTC 2003


> 	I posted a message a couple of days ago about trying to get
> rid of CNAME records that are orphaned by virtue of pointing to a
> non-existent domain.  Mark Andrews promptly answered my questions and
> told me to use the zone statement to avoid the SOA query error problem
> when nsupdate determines that the CNAME points to nothing useful.
> 
> 	This is all very straight-forward, but I am obviously doing
> something wrong.  Here is a capture of what happens.
> 
> bash-2.05b$ nsupdate -d -k keydir/Kkeyname 
> Creating key... 
> > zone okstate.edu 
> > update delete surefail.okstate.edu IN CNAME 
> > 
> Reply from SOA query: 
> ;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 15464 
> ;; flags: qr rd ra ; QUESTION: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0 
> ;; QUESTION SECTION: 
> ;surefail.okstate.edu.		IN	SOA 
>  
>  
> response to SOA query was unsuccessful 
> bash-2.05b$ exit 
> 
> 	Could this be related to Verisign's wild card games they are
> playing?  The surefail.okstate.edu CNAME points to a dot com domain
> which has vanished from the Earth.
> 
> 	The effect is that one can create a CNAME record quite
> normally, but that record is unremovable after it is in.
> 
> 	I created this example using the "script" utility so I could
> interact with nsupdate, but I get identical results when feeding
> nsupdate via a file.
> 
> Martin McCormick WB5AGZ  Stillwater, OK 
> OSU Information Technology Division Network Operations Group
> 
	
	Apply this patch or specify the server as well.

	The SOA query performs two tasks.
	1. find the zone the name lives in.
	2. find the master server for the zone.

	If we know the zone we can ask directly rather than
	indirectly usinge the ownername of the first record
	in the UPDATE section.

	Mark

Index: bin/nsupdate/nsupdate.c
===================================================================
RCS file: /proj/cvs/isc/bind9/bin/nsupdate/nsupdate.c,v
retrieving revision 1.123
diff -u -r1.123 nsupdate.c
--- bin/nsupdate/nsupdate.c	25 Jul 2003 02:22:23 -0000	1.123
+++ bin/nsupdate/nsupdate.c	18 Sep 2003 13:55:58 -0000
@@ -1798,7 +1798,7 @@
 	firstname = NULL;
 	dns_message_currentname(updatemsg, DNS_SECTION_UPDATE, &firstname);
 	dns_name_init(name, NULL);
-	dns_name_clone(firstname, name);
+	dns_name_clone((userzone != NULL) ? userzone : firstname, name);
 
 	ISC_LIST_INIT(name->list);
 	ISC_LIST_APPEND(name->list, rdataset, link);
--
Mark Andrews, Internet Software Consortium
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742                 INTERNET: Mark.Andrews at isc.org


More information about the bind-users mailing list