[Samba] cannot bind when doing a browser sync

Eric V. Smith eric at trueblade.com
Wed Jan 19 16:37:34 GMT 2005

I hope this isn't too long, and I hope it's the correct list.

I have a network configuration where I have 2 hosts, A and B.  Each has 
a local LAN on which the run Samba, plus they're connected by a VPN.  So 
has A has addresses lanA and wanA, and host B has addresses lanB and 
wanB.  Because of the way the VPN works, they can talk to each other 
either via their LAN addresses (lanA <-> lanB), or their WAN addresses 
(wanA <-> wanB), but not lanA <-> wanB, or lanB <-> wanA.  Each host has 
only their LAN interface in smb.conf, and has "bind interfaces only = 
yes".  Everything relating to smbd works great.

I'm trying to set up host A as a domain master browser, and host B as a 
local master browser.  This works fine, until they try to sync the 
browse list.  They register with each other correctly because 
nmbd/nmbd_sendannounce.c's browse_sync_remote is binding to the LAN address:

send_mailslot(True, BROWSE_MAILSLOT, outbuf,PTR_DIFF(p,outbuf),
               global_myname(), 0x0, "*", 0x0, addr, FIRST_SUBNET->myip, 

So I have "remote browse sync" set to the other hosts's LAN address, 
because the source address must local host's LAN address 
(FIRST_SUBNET->myip).  I've verified that each host sees the other's 
browse sync request.

So that's all well and good, but the actual sync happens in 
nmbd_synclists.c's sync_child().  It isn't doing any bind() or anything 
to set the source address, so it is sending data from wanA to lanB, but 
that doesn't work in my case.

Is there any way to control the source address that sync_child() uses? 
Any other suggestions?



More information about the samba mailing list