Use IP address of data connection to connect to the remote server in

passive mode.
pull/1/head
Tatsuhiro Tsujikawa 2011-01-20 00:30:01 +09:00
parent 1d71626bea
commit 1ea01e84b2
1 changed files with 4 additions and 2 deletions

View File

@ -636,8 +636,10 @@ bool FtpNegotiationCommand::recvPasv() {
throw DL_ABORT_EX2(fmt(EX_BAD_STATUS, status),
error_code::FTP_PROTOCOL_ERROR);
}
dataConnAddr_ = dest;
std::pair<std::string, uint16_t> peerInfo;
getSocket()->getPeerInfo(peerInfo);
peerInfo.second = dest.second;;
dataConnAddr_ = peerInfo;
return preparePasvConnect();
}