BUGFIX: NMBD_NAMEQUERY.C and MSDFS.C from Jul 9th CVS snapshot.

Christopher R. Hertel crh at nts.umn.edu
Tue Jul 10 15:59:27 GMT 2001


Hmmm...  You are right that the answer_ip is not being set.  

It's a local variable that *was* only being used in the case of the 
initial positive name query response.  It was not being set if the 
response was negative, or if the response was "extra".  I added the debug 
stuff to see what information was being returned in the "extra" responses.

My fix is to add the assignment of answer_ip within the multiple responses
debug block as follows: 

    if( DEBUGLVL( 0 ) )
      putip( (char *)&answer_ip, &nmb->answers->rdata[2] );
      dbgtext( "query_name_response: " );
      dbgtext( "Multiple (%d) responses ", rrec->num_msgs );

I'll check this into HEAD now.

Note that the only problem caused by not initializing this value would be 
a garbage IP in that particular debug message.  (That is, no showstopper.)
(Still, I'm quite embarrassed.)

Chris -)-----

RCS file: /data/cvs/samba/source/nmbd/nmbd_namequery.c,v
retrieving revision 1.11
diff -r1.11 nmbd_namequery.c
>       putip( (char *)&answer_ip, &nmb->answers->rdata[2] );

More information about the samba-technical mailing list