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)
commitf17b47b7fdd41d4daf16545a177bab9aafb2b14f
tree974b15c358d9ae7d2a4e0be136c06e8102b4a4e4
parent5aee4157de9273ed42fe8c384014319d9b362375
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.]
(This used to be commit 8e52439f4ae9de84107e2d0e9f33f0d4e3c5945a)
source3/nmbd/nmbd_winsserver.c