The Samba-Bugzilla – Attachment 1026 Details for
Bug 2439
[PATCH] query_name_response: Multiple responses received for a query
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Here is the patch
nmbd_namequery.patch (text/plain), 1.88 KB, created by
Filipe Henriques
on 2005-03-11 04:38:22 UTC
(
hide
)
Description:
Here is the patch
Filename:
MIME Type:
Creator:
Filipe Henriques
Created:
2005-03-11 04:38:22 UTC
Size:
1.88 KB
patch
obsolete
>--- samba-3.0.11.org/source/nmbd/nmbd_namequery.c Mon Oct 25 22:05:05 2004 >+++ samba-3.0.11.new/source/nmbd/nmbd_namequery.c Mon Mar 7 12:32:11 2005 >@@ -23,6 +23,10 @@ > > #include "includes.h" > >+/* -ffh 2005-2-23 (Filipe Henriques): >+ Keep record of last response. */ >+struct in_addr last_answer_ip; >+ > /**************************************************************************** > Deal with a response packet when querying a name. > ****************************************************************************/ >@@ -83,7 +87,11 @@ > success = True; > > putip((char *)&answer_ip,&nmb->answers->rdata[2]); >- >+ >+ /* -ffh 2005-2-23 (Filipe Henriques): >+ Keep record of this response. */ >+ putip((char *)&last_answer_ip,&nmb->answers->rdata[2]); >+ > if( DEBUGLVL( 5 ) ) { > dbgtext( "query_name_response: On subnet %s ", subrec->subnet_name ); > dbgtext( "- positive response from IP %s ", inet_ntoa(p->ip) ); >@@ -97,8 +105,14 @@ > */ > } > } else if( rrec->num_msgs > 1) { >+ /* More than one response. */ > >- if( DEBUGLVL( 0 ) ) { >+ /* -ffh 2005-2-23 (Filipe Henriques): >+ If this response answered the same IP address, >+ then that's because the network got reduncy servers >+ responding to this query. >+ Ignore, unless high debug level or diferent IP address. */ >+ if( DEBUGLVL( 5 ) || ( (memcmp (&last_answer_ip, &nmb->answers->rdata[2], 4) != 0) && DEBUGLVL( 0 ) ) ) { > if (nmb->answers) > putip( (char *)&answer_ip, &nmb->answers->rdata[2] ); > dbgtext( "query_name_response: " ); >@@ -107,6 +121,7 @@ > dbgtext( "for name %s.\nThis response ", nmb_namestr(question_name) ); > dbgtext( "was from IP %s, reporting ", inet_ntoa(p->ip) ); > dbgtext( "an IP address of %s.\n", inet_ntoa(answer_ip) ); >+ dbgtext( "Previous response reported an IP address of %s.\n", inet_ntoa(last_answer_ip) ); > } > > /* We have already called the success or fail function, so we
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 2439
: 1026