summaryrefslogtreecommitdiffstats
path: root/source/nameservreply.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/nameservreply.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/nameservreply.c')
-rw-r--r--source/nameservreply.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/nameservreply.c b/source/nameservreply.c
index 5b9c476549d..98247c76366 100644
--- a/source/nameservreply.c
+++ b/source/nameservreply.c
@@ -45,7 +45,7 @@ static void send_name_response(int fd, struct in_addr from_ip,
int name_trn_id, int opcode, BOOL success,
BOOL recursion_available, BOOL recursion_desired,
struct nmb_name *reply_name, int nb_flags, int ttl,
- struct in_addr ip)
+ struct in_addr ip)
{
char rdata[6];
struct packet_struct p;
@@ -96,7 +96,8 @@ void add_name_respond(struct subnet_record *d, int fd, struct in_addr from_ip,
/* reply yes or no to the host that requested the name */
/* see rfc1002.txt - 4.2.10 and 4.2.11 */
- send_name_response(fd,from_ip, response_id, NMB_REG,
+
+ send_name_response(fd, reply_to_ip, response_id, NMB_REG,
new_owner,
True, True,
name, nb_flags, ttl, reply_to_ip);
@@ -317,7 +318,8 @@ void reply_name_reg(struct packet_struct *p)
reply_name->name,reply_name->name_type,
nb_flags,0,0,NULL,NULL,
False, False,
- n->ip_flgs[0].ip, p->ip);
+ n->ip_flgs[0].ip, p->ip,
+ nmb->header.name_trn_id);
}
else
{