summaryrefslogtreecommitdiff
path: root/usr.sbin/ppp
diff options
context:
space:
mode:
authorbrian <brian@cvs.openbsd.org>2001-10-24 10:01:08 +0000
committerbrian <brian@cvs.openbsd.org>2001-10-24 10:01:08 +0000
commitced55eaf07194de926c63ac68aff019b8e8b4244 (patch)
tree3cb720321dcc52f6d4ed50a241d0071fe74f1b62 /usr.sbin/ppp
parent0cdec1df3586b195d7ad23c8af9598b729bbc648 (diff)
Fix a PASV bug; FreeBSD
Diffstat (limited to 'usr.sbin/ppp')
-rw-r--r--usr.sbin/ppp/ppp/alias_ftp.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.sbin/ppp/ppp/alias_ftp.c b/usr.sbin/ppp/ppp/alias_ftp.c
index 3a0a63f3b9f..b327e1a1c5a 100644
--- a/usr.sbin/ppp/ppp/alias_ftp.c
+++ b/usr.sbin/ppp/ppp/alias_ftp.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: alias_ftp.c,v 1.11 2001/08/21 04:09:15 brian Exp $
+ * $OpenBSD: alias_ftp.c,v 1.12 2001/10/24 10:01:07 brian Exp $
*/
/*
@@ -145,8 +145,10 @@ int maxpacketsize /* The maximum size this packet can grow to (including header
*/
if (ParseFtp227Reply(sptr, dlen))
ftp_message_type = FTP_227_REPLY;
- else if (ParseFtp229Reply(sptr, dlen))
+ else if (ParseFtp229Reply(sptr, dlen)) {
ftp_message_type = FTP_229_REPLY;
+ true_addr.s_addr = pip->ip_src.s_addr;
+ }
}
if (ftp_message_type != FTP_UNKNOWN_MESSAGE)
@@ -464,8 +466,7 @@ NewFtpMessage(struct ip *pip,
struct alias_link *ftp_link;
/* Security checks. */
- if (ftp_message_type != FTP_229_REPLY &&
- pip->ip_src.s_addr != true_addr.s_addr)
+ if (pip->ip_src.s_addr != true_addr.s_addr)
return;
if (true_port < IPPORT_RESERVED)