david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

[ftp] Terminate processing after receiving an error

When an error reply (not 1xx, 2xx or 3xx) was received, ftp_reply()
invoked ftp_done() to close connections, but did not return, and the
rest of code in this function could try to send commands to the closed
control connection.

Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
This commit is contained in:
Sergey Vlasov 2008-07-30 20:27:09 +01:00 committed by Michael Brown
parent 8f4c2b4a4c
commit e6cd16946a
1 changed files with 1 additions and 0 deletions

View File

@ -221,6 +221,7 @@ static void ftp_reply ( struct ftp_request *ftp ) {
( ( status_major == '3' ) && ( ftp->state == FTP_USER ) ) ) ){
/* Flag protocol error and close connections */
ftp_done ( ftp, -EPROTO );
return;
}
/* Open passive connection when we get "PASV" response */