From e65c64b34c096fef1a57347e59dd7cb0355488bc Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Wed, 5 Apr 2017 09:34:52 +1000 Subject: [PATCH] restore more accidently deleted stuff --- utils/magiftpd/magiftpd.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/utils/magiftpd/magiftpd.c b/utils/magiftpd/magiftpd.c index f994019..869e008 100644 --- a/utils/magiftpd/magiftpd.c +++ b/utils/magiftpd/magiftpd.c @@ -401,6 +401,10 @@ void handle_PASV(struct ftpserver *cfg, struct ftpclient *client) { socklen_t file_sock_len = sizeof(struct sockaddr_in6); getsockname(client->data_srv_socket, (struct sockaddr*) &file_addr, &file_sock_len); + ipcpy = strdup(client->hostip); + + ipptr = strtok(ipcpy, "."); + strcpy(buffer, "227 Entering Passive Mode ("); while (ipptr != NULL) { sprintf(buffer, "%s%s,", buffer, ipptr);