summaryrefslogtreecommitdiffstats
path: root/source3/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
commit9d3cce7c68723954bf3e97ba5681aa60c31eb835 (patch)
treeb6065399782987c9eb241e00dabc71b074a65e8b /source3/nameservreply.c
parentbe73ce8321d5714fcd74f71ed9f6532ca4e1090b (diff)
downloadsamba-9d3cce7c68723954bf3e97ba5681aa60c31eb835.tar.gz
samba-9d3cce7c68723954bf3e97ba5681aa60c31eb835.tar.xz
samba-9d3cce7c68723954bf3e97ba5681aa60c31eb835.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 (This used to be commit e1e86c1a160c8302004ea58e4f0f5874dd179dae)
Diffstat (limited to 'source3/nameservreply.c')
-rw-r--r--source3/nameservreply.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source3/nameservreply.c b/source3/nameservreply.c
index 5b9c476549..98247c7636 100644
--- a/source3/nameservreply.c
+++ b/source3/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
{