summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher R. Hertel <crh@samba.org>2001-07-10 16:10:04 +0000
committerChristopher R. Hertel <crh@samba.org>2001-07-10 16:10:04 +0000
commit22ea0770d87b2faece2e5dfc098ccf27f4da155f (patch)
tree4de7028e89ab06c044d2ab406c52c9e607d39c2a
parent9c9fe2674de0f35da67ba2c3b59861f087932934 (diff)
downloadsamba-22ea0770d87b2faece2e5dfc098ccf27f4da155f.tar.gz
samba-22ea0770d87b2faece2e5dfc098ccf27f4da155f.tar.xz
samba-22ea0770d87b2faece2e5dfc098ccf27f4da155f.zip
Fix from John Malmberg. When I added the additional information to the
debug block that reports multiple query responses I did not notice that the local answer_ip variable was only selectively set. Chris -)-----
-rw-r--r--source/nmbd/nmbd_namequery.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/nmbd/nmbd_namequery.c b/source/nmbd/nmbd_namequery.c
index 61435c14f55..67421103dd8 100644
--- a/source/nmbd/nmbd_namequery.c
+++ b/source/nmbd/nmbd_namequery.c
@@ -40,6 +40,8 @@ static void query_name_response( struct subnet_record *subrec,
&rrec->packet->packet.nmb.question.question_name;
struct in_addr answer_ip;
+ answer_ip.S_un.S_addr = 0; /* Fix from JEM...should always initialize. */
+
/* Ensure we don't retry the query but leave the response record cleanup
to the timeout code. We may get more answer responses in which case
we should mark the name in conflict.. */
@@ -103,6 +105,7 @@ static void query_name_response( struct subnet_record *subrec,
{
if( DEBUGLVL( 0 ) )
{
+ putip( (char *)&answer_ip, &nmb->answers->rdata[2] );
dbgtext( "query_name_response: " );
dbgtext( "Multiple (%d) responses ", rrec->num_msgs );
dbgtext( "received for a query on subnet %s ", subrec->subnet_name );