Making an XP-like printer test work against Samba 3.2

Stefan (metze) Metzmacher metze at
Tue Dec 11 08:50:19 GMT 2007

Jeremy Allison schrieb:
> On Mon, Dec 10, 2007 at 07:30:26PM +0100, Kai Blin wrote:
>> Hi folks,
>> in the past weeks I've been working on a Samba4 torture test that mimics the 
>> traffic occurring when browsing for a printer from a WinXP client to a Win2k3 
>> server[1].
>> When I went to try this against Samba 3.2, I stumbled over a couple of issues. 
>> The one that I couldn't quite figure out how to fix instead of just hacking 
>> around it is the is_myname_or_ipaddr() in util_sock.c
>> During make test runs, there's an smbd listening on, but 
>> is_myname_or_ipaddr() doesn't accept that IP address. Now Jerry, who was a 
>> great help in pointing me at the actual problem, asked me to see if I could 
>> fix this in a way that would work for IPv4 and the equivalent 
>> IPv6 address range.
>> While I'm at it, in util_sock.c:2127 we return false if is_loopback_addr() 
>> returns true. But on line 2090, we already catch this case and return true.
>> I assume the behaviour on line 2090 is the intended one, I wonder if there's a 
>> reason why wouldn't be acceptable, though.
>> Any thoughts/suggestions?
> I could easily add is_loopback_net() and return true in this case.
> I think that's correct anyway.

I don't think that's correct, as we want to test that the only accepts
addresses it's listening on. When we will get back the perltest stuff
we will be able to setup mutliple servers on,3,4...
and each should only accept its own address.

I think we should check against what we have in the "interfaces" line.
Currently we use this:

        interfaces =
        bind interfaces only = yes

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url :

More information about the samba-technical mailing list