summaryrefslogtreecommitdiffstats
path: root/source/nameresp.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1997-10-15 09:15:45 +0000
committerAndrew Tridgell <tridge@samba.org>1997-10-15 09:15:45 +0000
commite1e86c1a160c8302004ea58e4f0f5874dd179dae (patch)
treeb9a4a216f64d928e4589a55471beca4e621937c5 /source/nameresp.c
parent708edc348f0fb81d9c918e4bf857f339a13a3781 (diff)
downloadsamba-e1e86c1a160c8302004ea58e4f0f5874dd179dae.tar.gz
samba-e1e86c1a160c8302004ea58e4f0f5874dd179dae.tar.xz
samba-e1e86c1a160c8302004ea58e4f0f5874dd179dae.zip
fixed the freeze on logout bug. The fix has several parts:
1) add a new parameter to queue_netbios_packet(), the "reply_id", this is the id that should be used when sending a further response to the packet (such as a response after we get back a reply to a name query after senidnga WACK). reply_id is 0 (meaning unused) in most cases. 2) fix the id used in the reply in add_name_respond() from response_name_query_register() 3) remember to remove the response record at the end of response_name_query_register() 4) get the right IP address (it was 0.0.0.0) in response_name_query_register() 5) add a new field reply_id to struct response_record
Diffstat (limited to 'source/nameresp.c')
-rw-r--r--source/nameresp.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/nameresp.c b/source/nameresp.c
index f44171f4b67..c40dd16a888 100644
--- a/source/nameresp.c
+++ b/source/nameresp.c
@@ -115,7 +115,7 @@ static void dead_netbios_entry(struct subnet_record *d,
wanted the unique name and tell them that they can have it
*/
- add_name_respond(d,n->fd,d->myip, n->response_id ,&n->name,
+ add_name_respond(d,n->fd,d->myip, n->reply_id ,&n->name,
n->nb_flags, GET_TTL(0),
n->reply_to_ip, True, n->reply_to_ip);
@@ -281,7 +281,7 @@ struct response_record *queue_netbios_pkt_wins(
return queue_netbios_packet(wins_subnet,fd, quest_type, state,
name, name_type, nb_flags, ttl,
server_type,my_name,my_comment,
- False, True, send_ip, reply_to_ip);
+ False, True, send_ip, reply_to_ip, 0);
}
@@ -296,7 +296,8 @@ struct response_record *queue_netbios_packet(struct subnet_record *d,
int name_type,int nb_flags, time_t ttl,
int server_type, char *my_name, char *my_comment,
BOOL bcast,BOOL recurse,
- struct in_addr send_ip, struct in_addr reply_to_ip)
+ struct in_addr send_ip, struct in_addr reply_to_ip,
+ int reply_id)
{
struct response_record *n;
uint16 id = 0xffff;
@@ -315,7 +316,8 @@ struct response_record *queue_netbios_packet(struct subnet_record *d,
if ((n = make_response_queue_record(state,id,fd,
quest_type,name,name_type,nb_flags,ttl,
server_type,my_name, my_comment,
- bcast,recurse,send_ip,reply_to_ip)))
+ bcast,recurse,send_ip,reply_to_ip,
+ reply_id)))
{
add_response_record(d,n);
return n;