mirror of
https://github.com/ipxe/ipxe
synced 2025-12-22 04:50:25 +03:00
[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:
committed by
Michael Brown
parent
8f4c2b4a4c
commit
e6cd16946a
@@ -221,6 +221,7 @@ static void ftp_reply ( struct ftp_request *ftp ) {
|
|||||||
( ( status_major == '3' ) && ( ftp->state == FTP_USER ) ) ) ){
|
( ( status_major == '3' ) && ( ftp->state == FTP_USER ) ) ) ){
|
||||||
/* Flag protocol error and close connections */
|
/* Flag protocol error and close connections */
|
||||||
ftp_done ( ftp, -EPROTO );
|
ftp_done ( ftp, -EPROTO );
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Open passive connection when we get "PASV" response */
|
/* Open passive connection when we get "PASV" response */
|
||||||
|
|||||||
Reference in New Issue
Block a user