I am writing a small CIFS server. I dont want to use extended security
feature. This means that I will use the challenge response
authentication format.

I tried to connect to my server from PC.
PC sent me a NEGOTIATE_PROTOCOL request.
I sent backa NEGOTIATE_PROTOCOL RESPONSE with extended security feature
off.

Then the PC sent me a SESSION_SETUP_REQUEST_ANDX (with
TREE_CONNECT_ANDX) .

I replied back with SESSION_SETUP_RESPONSE_ANDX_TREE_SETUP_ANDX. with
proper User ID and Tree Id.

But somehow PC sends me again the
SESSION_SETUP_REQUEST_ANDX_TREE_CONNECT

This happens two times and PC starts again with NEGOTIATE_PROTOCOL
request.

Can anybody tell me what could be the problem?