DMB registration bug (all branches): query sent from wrong interface

Steve Langasek vorlon at netexpress.net
Tue Aug 29 16:49:46 GMT 2000


Hello,

I've found a problem in the way nmbd handles registration of the DOMAIN<1b>
name with the WINS server.  Here's a snippet of the logfile from a SAMBA_TNG
nmbd (no debugging):

[2000/08/29 11:29:01, 1] nmbd/nmbd.c:main(759)
  Netbios nameserver version TNG-alpha started.
  Copyright Andrew Tridgell 1994-1998
add_domain_logon_names:
Attempting to become logon server for workgroup DOMAIN on subnet 206.139.14.11
add_domain_logon_names:
Attempting to become logon server for workgroup DOMAIN on subnet UNICAST_SUBNET
become_domain_master_browser_wins:
Attempting to become domain master browser on workgroup DOMAIN, subnet UNICAST_SUBNET.
become_domain_master_browser_wins: querying WINS server at IP xx.xx.xx.xx for domain master browser name DOMAIN<1b> on workgroup DOMAIN
become_logon_server_success: Samba is now a logon server for workgroup DOMAIN on subnet UNICAST_SUBNET
become_logon_server_success: Samba is now a logon server for workgroup DOMAIN on subnet 206.139.14.11
become_domain_master_query_fail: Error 0 returned when querying WINS server for name DOMAIN<1b>.

Closer inspection shows that the query sent to the wins server for the
DOMAIN<1b> name, to see if the name is already registered, is being sent from
the wrong interface.  I have 'interfaces = 206.139.14.11/24' and
'bind interfaces only = yes' in my smb.conf file, and all other communications
with the WINS server happen on the right interface; but for some reason, this
query uses interface eth0 for its source IP.  Since this copy of nmbd isn't
listening on that interface (another copy of nmbd is), nmbd never receives the
reply, which results in the 'Error 0' in become_domain_master_query_fail().

This problem appears to affect all current branches of Samba; I've tried the
nmbd from both 2.0.7 and TNG with the same results, and the nmbd code in HEAD
looks almost identical to that in TNG.

I'm going to see if I can find the bug in the code, but in the meantime I
figured I'd post the information here in case anyone else wanted to take a
crack at it :)

Regards,
Steve Langasek
postmodern programmer





More information about the samba-ntdom mailing list