Minor patch for nslookup/debug.c (for SIG records)

G Muthukumar muthukumar.guhadoss at wipro.com
Tue May 16 12:01:57 UTC 2000


1. nslookup gives "RR format error" (along with the hexadecimal dump) while
printing SIG records.

The following fix (w.r.t. 8.2.3 T5B) for nslookup/debug.c corrects the 
problem:

*** debug.c	Wed Oct 13 22:09:16 1999
--- debug.c.new	Tue May 16 16:52:10 2000
***************
*** 620,627 ****
  	case T_KEY:
  	default: {
  		char buf[2048];	/* XXX need to malloc/realloc. */
  
! 		if (ns_sprintrrf(msg, eom - msg, "?", (ns_class)class,
  				 (ns_type)type, rrttl, cp1, dlen, NULL, NULL,
  				 buf, sizeof buf) < 0) {
  			perror("ns_sprintrrf");
--- 620,634 ----
  	case T_KEY:
  	default: {
  		char buf[2048];	/* XXX need to malloc/realloc. */
+ 		char rrname[NS_MAXDNAME];
  
! 		cp2 = p_fqnname(ocp, msg, NS_MAXCDNAME, rrname, sizeof rrname);
! 		if (cp2 == NULL) {
! 			fprintf(file, "(name truncated?)\n");
! 			return (NULL);                  /* compression error */
! 		}
! 
! 		if (ns_sprintrrf(msg, eom - msg, rrname, (ns_class)class,
  				 (ns_type)type, rrttl, cp1, dlen, NULL, NULL,
  				 buf, sizeof buf) < 0) {
  			perror("ns_sprintrrf");

2. The following routines are found in the distribution under different
names (i.e.) resolver(3) man page lists these functions but the routine
names are actually different in the source code. Either the man page can be
corrected OR additional #defines may be added to resolv.h.
	(These were checked on 8.2.2-P5; just did a grep of these functions 
with 8.2.3 T5B and could not find these routines in it either)

	man page			source code
	--------			-----------
res_nisourserver			res_ourserver_p
res_npquery				res_pquery
res_nsendupdate				res_nupdate takes care of this by
					calling res_nsendsigned if key is
					not NULL (call res_nsend otherwise)
p_nquery				fp_nquery (might be a typo in the
					man page


Regards,
Muthu



More information about the bind-workers mailing list