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

jgerard at wawanesa.com jgerard at wawanesa.com
Tue Jun 29 17:28:53 GMT 2004


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.



____________________________________
Jeff Gerard - Systems Administrator
Wawanesa Mutual Insurance Company
Office: 204-985-0517
Fax:    204-947-5192
Email:  jgerard at wawanesa.com




Jeremy Allison <jra at samba.org> 
28/06/2004 07:40 PM
Please respond to
Jeremy Allison <jra at samba.org>


To
Guillaume Millet <guillaume.millet at oktal.fr>
cc
jgerard at wawanesa.com, samba at lists.samba.org
Subject
Re: [Samba] Samba 3.0.3/4 - WINS server expires names after 2 hours






On Thu, Jun 24, 2004 at 04:25:52PM +0200, Guillaume Millet wrote:
> Hello,
> 
> I had the same problem.
> I've found a workaround by patching the code in 
"nmbd/nmbd_namelistdb.c":
> 
> /*******************************************************************
>  Expires old names in all subnet namelists.
> ******************************************************************/
> 
> void expire_names(time_t t)
> {
>        struct subnet_record *subrec;
> 
>        for( subrec = FIRST_SUBNET; subrec; subrec = 
>        NEXT_SUBNET_INCLUDING_UNICAST(subrec) ) {
>                expire_names_on_subnet( subrec, t );
>        }
> 
>        expire_names_on_subnet( wins_server_subnet, t ); /* ADD THIS LINE 

>        FOR REMOVING EXPIRED NAME FROM WINS TABLE */
> }
> 
> I dont know if it's the correct things to do, but it works fine for me 
> with my configuration (PDC+LDAP+WINS with Samba 3.0.4 on MDK 9.2)
> If a real Samba develloper can have a quick look to this to make a real 
> correction for next release.

Ok, I've looked at this in the current Samba 3.0.5preXX code (SVN) and
here is the fix I think should work. It forced DNS and DNSFAIL names to
be removed from the WINS db immediately their timeout persiod expires and
not to go into the "tombstoned" state (where they would hang around for
another day).

Let me know if this fixes the problem for you.

Thanks,

                 Jeremy.



More information about the samba mailing list