curl-library
iis = dummy ftp ? Was: strange behaviour, data connection mix!?
Date: Wed, 23 Aug 2006 21:33:38 +0200
Hello all,
I just discovered a very interesting idiotic thing from IIS. It does not
pre-allocate ports when proposing the PASV reply, have a look:
19:48:30: FTP: c 271B5E8 Accepted 49 bytes from socket 3708
19:48:30: FTP: < 271B5E8 227 Entering Passive Mode (64,62,196,204,5,73).
19:48:30: FTP: c 271B5E8 Expire at 193500 / 89000 (300000ms)
19:48:30: FTP: c 271B5E8 Trying 64.62.196.204...
19:48:30: FTP: c 271B5E8 TCP_NODELAY set
19:48:30: FTP: c 271B5E8 Connecting to 64.62.196.204 (64.62.196.204) port
1353 <-----
19:48:30: FTP: c 2622378 Accepted 49 bytes from socket 3780
19:48:30: FTP: < 2622378 227 Entering Passive Mode (64,62,196,204,5,73).
19:48:30: FTP: c 2622378 Expire at 193500 / 92000 (300000ms)
19:48:30: FTP: c 2622378 Trying 64.62.196.204...
19:48:30: FTP: c 2622378 TCP_NODELAY set
19:48:30: FTP: c 2622378 Connecting to 64.62.196.204 (64.62.196.204) port
1353 <-----
NB: at that time, the two connections are really just connectING not
connectED.
as you can see, the FTP server proposes to two parallel connections to get
their data from the SAME port ! in this situation I'm pretty sure that the
connection will get bound randomly, hence the swap in some situations!
so so, what to do? when using passive mode, should we find a way to enforce
connection of data socket before letting a new EPSV/PASV?
Armel
Received on 2006-08-23