Oddity in port 445 behavior...

Christopher R.Hertel crh at ubiqx.mn.org
Sun Jun 23 13:10:02 GMT 2002


On Sun, Jun 23, 2002 at 10:44:35AM +0200, Urban Widmark wrote:
> On Fri, 21 Jun 2002, Christopher R.Hertel wrote:
> 
> >   The problem here is that W2K simply ignores the packet, so the client
> >   must decide whether to time-out waiting for a reply or to start sending
> >   SMBs before it knows if it got an error message back from the server.
> >   I am not sure what happens if it times out, but we have seen Windows
> >   behave strangely if it senses a delay.  Perhaps the best way to handle
> >   this is to make the connection, try the NBT SESSION SETUP, if you get a
> >   response then go with it, if not then close the connection and try again
> >   without the NBT SESSION SETUP.
> 
> Having a timeout sounds bad, everyone doing ssh tunnelling to port 445 on
> win2k will hit it.
> 
> Would this work for non 139/445 ports?
> 
> 1. Send the NBT SESSION SETUP, but don't wait for a reply.
> 2. Send the protocol negotiation request (or whichever comes first).
> 3. Wait for a reply.
> 4. If the reply matches (1) then wait for the reply to (2).
> 
> Or just provide an option and let the user specify it.

You wouldn't need to wait for the SESSION RESPONSE if you got a positive
response to the negprot.  I think you're right that the trick is not
waiting for the NBT-layer reply.

Chris -)-----

-- 
Samba Team -- http://www.samba.org/     -)-----   Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/   -)-----   ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/     -)-----   crh at ubiqx.mn.org
OnLineBook -- http://ubiqx.org/cifs/    -)-----   crh at ubiqx.org




More information about the samba-technical mailing list