From ec6fde99ab739ff2c410e5459bba06b06d18b5dc Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 20 Apr 1998 20:32:50 +0000 Subject: Fixed bug that John found in WINS server code. When nmbd as a WINS server is sending out a name_query after a WACK, it needs to send a packet with recursion_desired = 0 (yes Luke, you were right all along :-). If it doesn't then if it's talking to itself then the query packet ends up back in the WINS server instead of in the client side code. Makefile: Changed proto generation to stop including NMBDOBJ twice. nmbd_namequery.c nmbd_packets.c nmbd_winsserver.c: Added extra query_name_from_wins_server() code. Jeremy. (This used to be commit c5ca05c29546053a771f4ea3ef850efb3be970ea) --- source3/nmbd/nmbd_winsserver.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'source3/nmbd/nmbd_winsserver.c') diff --git a/source3/nmbd/nmbd_winsserver.c b/source3/nmbd/nmbd_winsserver.c index afc8741366..d089686917 100644 --- a/source3/nmbd/nmbd_winsserver.c +++ b/source3/nmbd/nmbd_winsserver.c @@ -808,20 +808,17 @@ is one of our (WINS server) names. Denying registration.\n", namestr(question) ) memcpy(userdata->data, (char *)&p, sizeof(struct packet_struct *) ); /* - * As query_name uses the subnet broadcast address as the destination - * of the packet we temporarily change the subnet broadcast address to - * be the first IP address of the name owner and send the packet. This - * is a *horrible* hack but the alternative is to add the destination - * address parameter to all query_name() calls. I hate this code :-). + * Use the new call to send a query directly to an IP address. + * This sends the query directly to the IP address, and ensures + * the recursion desired flag is not set (you were right Luke :-). + * This function should *only* be called from the WINS server + * code. JRA. */ - subrec->bcast_ip = *namerec->ip; - - query_name( subrec, question->name, question->name_type, + query_name_from_wins_server( *namerec->ip, question->name, question->name_type, wins_register_query_success, wins_register_query_fail, userdata); - subrec->bcast_ip = ipzero; return; } -- cgit