WINS, dialup, and netlogon problems

Luke Kenneth Casson Leighton lkcl at switchboard.net
Mon Sep 21 16:01:57 GMT 1998


On Sun, 20 Sep 1998, Richard Sharpe wrote:

> Hi,
> 
> I am having problems at NCI with respect to WINS.
> 
> 1. We are having a lot of problems with dial-in users not being logged in.
> After testing, I am pretty certain that this has to do with the user's PC's
> entries being in wins.dat multiple times. That is:
> 
> 1. The user's PC logs in one night and they get:
> 
>     IP address =172.16.10.120
> 
>    so they have a PC#00, PC#03 and PC#20 all saying 172.16.10.120
> 
>    Next night they log in, because a different modem is used, they get:
> 
>     IP address = 172.16.10.121
> 
>    so they have a PC#00, PC#03, and PC#20 all saying 172.16.10.121 as well
>    as the entries above!

that should be absolutely fine, _as long as_ the "expired" entries in
wins.dat are treated as such, and deleted once a new ip address comes in
for the name.

code something like this:

lookup_name(PC#00)
if (exists())
{
	if (!expired(PC#0))
	{
		send_WACK(); /* to querier: tells them to wait */
		query_current_owner(); /* see if they still want the name*/
		if (still_owns_name())
		{
			reject_name(PC#0);
		}
		else
		{
			delete_old_owner();
			register_name(PC#0);
		}
	}
	else
	{
		delete_expired_name(PC#0);
		register_name(PC#0);
	}
}
else
{
	register_name(PC#0);
}



More information about the samba-technical mailing list