Bug report 1079 and fix both from Bert Driehuis.
authorChristopher R. Hertel <crh@samba.org>
Fri, 12 Mar 2004 20:27:23 +0000 (20:27 +0000)
committerChristopher R. Hertel <crh@samba.org>
Fri, 12 Mar 2004 20:27:23 +0000 (20:27 +0000)
commit8e52439f4ae9de84107e2d0e9f33f0d4e3c5945a
tree57990113ea77332d161e3c0b52d7e19c29c01d3e
parent11487e24666c7b3dd4b37f4ef8aec8f8a5bd5a6f
Bug report 1079 and fix both from Bert Driehuis.

This is an odd corner case having to do with <1C> group names (DC names).
<1C> group names are called (by MS) "Internet Special Groups", which means
that Microsoft's WINS servers will attempt to handle these names in
something approximating an RFC1001/1002 compliant manner.

The problem being reported here is this:  If an initial registration sent
by one of the group members is lost (network error, whatever) then
subsequent refreshes from that particular machine will also fail.  This
only happens if the name is already active (because of other group
members).

In most cases, we (and MS) handle refreshes as registrations if the name
is not in the database.  In this situation, we missed the corner case.

Bert's fix adds an 'else if' that catches the situation in which a refresh
for an unlisted IP of an active <1C> group name is received.  The refresh
is simply handled as a registration when this happens.

[Note: Committing in HEAD.  I am writing some tools to do registrations
       and refreshes so that I can test this.  I don't have an NT Domain
       for testing so I'm going to have to fudge.  This fix is small (I
       cleaned up some Debug messages and comments in addition to the fix)
       and if you want to test it with 3.0.x you can just copy the HEAD
       version into your 3.0.x tree and recompile.]
source/nmbd/nmbd_winsserver.c