DMB registration bug: query sent from wrong interface

Jeremy Allison jeremy at valinux.com
Tue Aug 29 22:28:47 GMT 2000


Steve Langasek wrote:
> 
> To follow up on my own post, I've found that registrations, refreshes, and
> releases of names all work correctly.  This is easy: the packets being sent
> contain the IP information we need to correctly choose an interface, so the
> packet is sent out with an appropriate source IP.  With a query, on the other
> hand, there is no obvious "right" IP to bind to when sending the packet; all
> we care about is that our query makes it to the WINS server, and the WINS
> server's response makes it back to us.  So nmbd uses the socket that's bound
> to INADDR_ANY (0.0.0.0).  This lets the OS choose the source IP to use when
> sending the outgoing packet -- and in at least some cases, it's choosing the
> 'wrong' one, because it's using the primary IP for my Linux box.  That IP has
> another copy of nmbd running on it, and the response packet sent by the WINS
> server disappears into the void.
> 
> What's the right way to make nmbd talk to the WINS server using the
> appropriate source IP when 'interfaces' and 'bind interfaces only' are
> configured?

Thanks for the analysis. I would recommend changing the 
query code to check for the 'interfaces' and 'bind interfaces only'
being set case and if so use the first interface in the
explicit list to send the query.

If you could send a patch I'd include it asap, if not I'll
try and get to it after the ACL code.

Jeremy.

-- 
--------------------------------------------------------
Buying an operating system without source is like buying
a self-assembly Space Shuttle with no instructions.
--------------------------------------------------------




More information about the samba-technical mailing list