From 1756607c08b6c51b5d55ef2f661ee217b90f3dfb Mon Sep 17 00:00:00 2001 From: deraadt Date: Fri, 25 Apr 1997 11:06:28 +0000 Subject: [PATCH] do not allow connect to a 2049 either, helps firewall cases; adam@math.tau.ac.il --- libexec/ftpd/ftpd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index 879f47a72de..d2eaeffafdf 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ftpd.c,v 1.33 1997/03/25 22:47:10 millert Exp $ */ +/* $OpenBSD: ftpd.c,v 1.34 1997/04/25 11:06:28 deraadt Exp $ */ /* $NetBSD: ftpd.c,v 1.15 1995/06/03 22:46:47 mycroft Exp $ */ /* @@ -1191,7 +1191,8 @@ dataconn(name, size, mode) * attempt to connect to reserved port on client machine; * this looks like an attack */ - if (ntohs(data_dest.sin_port) < IPPORT_RESERVED) { + if (ntohs(data_dest.sin_port) < IPPORT_RESERVED || + ntohs(data_dest.sin_port) == 2049) { /* XXX */ perror_reply(425, "Can't build data connection"); (void) fclose(file); data = -1; -- 2.20.1