[Samba] Samba 3.0.3/4 - WINS server expires names after 2 hours

Jeremy Allison jra at samba.org
Tue Jun 29 17:22:38 GMT 2004


On Tue, Jun 29, 2004 at 12:28:53PM -0500, jgerard at wawanesa.com wrote:
> Ok..tried this and no go...
> 
> First request:
> 
> [2004/06/29 10:06:07, 3] 
> nmbd/nmbd_winsserver.c:wins_process_name_query_request(1485)
>   wins_process_name_query: name query for name COMSRV6<00> from IP 
> 10.111.1.111
> [2004/06/29 10:06:07, 3] 
> nmbd/nmbd_winsserver.c:wins_process_name_query_request(1549)
>   wins_process_name_query: name query for name COMSRV6<00> not found - 
> doing dns lookup.
> [2004/06/29 10:06:07, 3] nmbd/asyncdns.c:queue_dns_query(308)
>   added DNS query for COMSRV6<00>
> [2004/06/29 10:06:07, 3] nmbd/asyncdns.c:add_dns_result(43)
>   add_dns_result: DNS gave answer for COMSRV6 of 10.230.1.1
> [2004/06/29 10:06:07, 3] nmbd/nmbd_namelistdb.c:add_name_to_subnet(236)
>   add_name_to_subnet: Added netbios name COMSRV6<00> with first IP 
> 10.230.1.1 ttl=7200 nb_flags= 4 to subnet WINS_SERVER_SUBNET
> 
> ....2 hours passes....
> 
> Request after expirey:
> 
> [2004/06/29 12:07:26, 3] 
> nmbd/nmbd_winsserver.c:wins_process_name_query_request(1485)
>   wins_process_name_query: name query for name COMSRV6<00> from IP 
> 10.111.1.111
> [2004/06/29 12:07:26, 3] 
> nmbd/nmbd_winsserver.c:wins_process_name_query_request(1531)
>   wins_process_name_query: name query for name COMSRV6<00> - name expired. 
> Returning fail.

Thanks - dumb mistake of mine, sorry. Used "break" instead of
"continue" so I was only expiring the first record. DOH !

I'm attaching two files, the first is the complete patch with
"break" changed to "continue" and should be applied to 3.0.4 or
above.

The second is just the "break" changed to "continue" fix and applies
to the source you're running.

Sorry for the mistake.

Jeremy.
-------------- next part --------------
Index: nmbd/nmbd_winsserver.c
===================================================================
--- nmbd/nmbd_winsserver.c	(revision 1287)
+++ nmbd/nmbd_winsserver.c	(working copy)
@@ -1727,11 +1727,16 @@
 		     && (namerec->data.death_time < t) ) {
 
 			if( namerec->data.source == SELF_NAME ) {
-				DEBUG( 3, ( "expire_names_on_subnet: Subnet %s not expiring SELF name %s\n", 
+				DEBUG( 3, ( "initiate_wins_processing: Subnet %s not expiring SELF name %s\n", 
 				           wins_server_subnet->subnet_name, nmb_namestr(&namerec->name) ) );
 				namerec->data.death_time += 300;
 				namerec->subnet->namelist_changed = True;
 				continue;
+			} else if (namerec->data.source == DNS_NAME || namerec->data.source == DNSFAIL_NAME) {
+				DEBUG(3,("initiate_wins_processing: deleting timed out DNS name %s\n",
+						nmb_namestr(&namerec->name)));
+				remove_name_from_namelist( wins_server_subnet, namerec );
+				continue;
 			}
 
 			/* handle records, samba is the wins owner */
-------------- next part --------------
Index: nmbd/nmbd_winsserver.c
===================================================================
--- nmbd/nmbd_winsserver.c	(revision 1298)
+++ nmbd/nmbd_winsserver.c	(working copy)
@@ -1736,7 +1736,7 @@
 				DEBUG(3,("initiate_wins_processing: deleting timed out DNS name %s\n",
 						nmb_namestr(&namerec->name)));
 				remove_name_from_namelist( wins_server_subnet, namerec );
-				break;
+				continue;
 			}
 
 			/* handle records, samba is the wins owner */


More information about the samba mailing list