diff options
author | Jeremy Allison <jra@samba.org> | 1998-02-20 19:48:01 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-02-20 19:48:01 +0000 |
commit | c16d4aec00230983973be3b827d1209f5db65d9c (patch) | |
tree | 40c9ce5caeef8211ef2381dee11ac8d1200ecc08 /source3/nmbd | |
parent | c57e8d404d8ab32fe08e9f85d5326160671b56d5 (diff) | |
download | samba-c16d4aec00230983973be3b827d1209f5db65d9c.tar.gz samba-c16d4aec00230983973be3b827d1209f5db65d9c.tar.bz2 samba-c16d4aec00230983973be3b827d1209f5db65d9c.zip |
nmbd_packets.c: nmbd_subnetdb.c: Patch from Andrey Alekseyev <fetch@muffin.arcadia.spb.ru>
to fix the fact that retransmit_or_expire_response_records() wasn't looking
at the WINS subnet.
server.c: Patch from jkf@soton.ac.uk to add %p (NIS server path) substitution.
smbpass.c: Fix to stop parsing failing on non-valid lines.
trans2.c: Fix for volume serial number code.
util.c: Patch from jkf@soton.ac.uk to add %p (NIS server path) substitution.
Fix for warnings under RH5. gcc 2.8.
Jeremy.
(This used to be commit e58ab3bbe6e939ba678ad5482e58e0191c8dcbcb)
Diffstat (limited to 'source3/nmbd')
-rw-r--r-- | source3/nmbd/nmbd_packets.c | 8 | ||||
-rw-r--r-- | source3/nmbd/nmbd_subnetdb.c | 24 |
2 files changed, 30 insertions, 2 deletions
diff --git a/source3/nmbd/nmbd_packets.c b/source3/nmbd/nmbd_packets.c index 9dad5ddaa9..cd99343e70 100644 --- a/source3/nmbd/nmbd_packets.c +++ b/source3/nmbd/nmbd_packets.c @@ -1486,14 +1486,18 @@ void run_packet_queue() /******************************************************************* Retransmit or timeout elements from all the outgoing subnet response - record queues. + record queues. NOTE that this code must also check the WINS server + subnet for response records to timeout as the WINS server code + can send requests to check if a client still owns a name. + (Patch from Andrey Alekseyev <fetch@muffin.arcadia.spb.ru>). ******************************************************************/ void retransmit_or_expire_response_records(time_t t) { struct subnet_record *subrec; - for (subrec = FIRST_SUBNET; subrec; subrec = NEXT_SUBNET_INCLUDING_UNICAST(subrec)) + for (subrec = FIRST_SUBNET; subrec; + subrec = get_next_subnet_maybe_unicast_or_wins_server(subrec)) { struct response_record *rrec, *nextrrec; diff --git a/source3/nmbd/nmbd_subnetdb.c b/source3/nmbd/nmbd_subnetdb.c index 5e18fe9cc0..07692cc82c 100644 --- a/source3/nmbd/nmbd_subnetdb.c +++ b/source3/nmbd/nmbd_subnetdb.c @@ -289,3 +289,27 @@ struct subnet_record *get_next_subnet_maybe_unicast(struct subnet_record *subrec else return subrec->next; } + +/******************************************************************* + Access function used by retransmit_or_expire_response_records() in + nmbd_packets.c. Patch from Andrey Alekseyev <fetch@muffin.arcadia.spb.ru> + Needed when we need to enumerate all the broadcast, unicast and + WINS subnets. +******************************************************************/ + +struct subnet_record *get_next_subnet_maybe_unicast_or_wins_server(struct subnet_record *subrec) +{ + if(subrec == unicast_subnet) + if(wins_server_subnet) + return wins_server_subnet; + else + return NULL; + + if(wins_server_subnet && subrec == wins_server_subnet) + return NULL; + + if((subrec->next == NULL) && we_are_a_wins_client()) + return unicast_subnet; + else + return subrec->next; +} |