aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Vlasov <vsu@altlinux.ru>2008-07-30 20:27:09 +0100
committerMichael Brown <mcb30@etherboot.org>2008-07-30 20:27:09 +0100
commite6cd16946a2c52f39d3ea308ab1fb80a85c9d0a3 (patch)
treec22c9ece59c7283954459e7428d0a380b85a17d4
parent8f4c2b4a4c5c3a3d29a102a758e75b65cadf9946 (diff)
downloadipxe-e6cd16946a2c52f39d3ea308ab1fb80a85c9d0a3.tar.gz
[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>
-rw-r--r--src/net/tcp/ftp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/net/tcp/ftp.c b/src/net/tcp/ftp.c
index 9a12064e1..3b88f7b6b 100644
--- a/src/net/tcp/ftp.c
+++ b/src/net/tcp/ftp.c
@@ -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 */