diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2001-05-08 19:58:03 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2001-05-08 19:58:03 +0000 |
commit | a5c354bfab06495e72c96b02b24212614c59d19b (patch) | |
tree | 9942e4116b618c51bb761eced35e7f9a56fed56f /sys/netinet/ip_ftp_pxy.c | |
parent | 2ec07a92b540d36ffad2b126ccf9cfe94de0d963 (diff) |
IPfilter 3.4.17; kjell@ deraadt@ ok.
Diffstat (limited to 'sys/netinet/ip_ftp_pxy.c')
-rw-r--r-- | sys/netinet/ip_ftp_pxy.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/sys/netinet/ip_ftp_pxy.c b/sys/netinet/ip_ftp_pxy.c index 8cedf2807a1..a82544da0f2 100644 --- a/sys/netinet/ip_ftp_pxy.c +++ b/sys/netinet/ip_ftp_pxy.c @@ -1,10 +1,10 @@ -/* $OpenBSD: ip_ftp_pxy.c,v 1.13 2001/03/17 22:54:20 beck Exp $ */ +/* $OpenBSD: ip_ftp_pxy.c,v 1.14 2001/05/08 19:58:01 fgsch Exp $ */ /* * Simple FTP transparent proxy for in-kernel use. For use with the NAT * code. * - * $IPFilter: ip_ftp_pxy.c,v 2.7.2.20 2000/12/02 00:15:06 darrenr Exp $ + * $IPFilter: ip_ftp_pxy.c,v 2.7.2.21 2001/01/17 13:30:52 darrenr Exp $ */ #if SOLARIS && defined(_KERNEL) extern kmutex_t ipf_rw; @@ -515,12 +515,11 @@ int dlen; if ((ftp->ftp_passok == 1) && !strncmp(rptr, "331", 3)) ftp->ftp_passok = 2; - else if ((ftp->ftp_passok == 1) && !strncmp(rptr, "230", 3)) - ftp->ftp_passok = 4; - else if ((ftp->ftp_passok == 3) && !strncmp(rptr, "230", 3)) - ftp->ftp_passok = 4; - else if ((ftp->ftp_passok == 3) && !strncmp(rptr, "530", 3)) - ftp->ftp_passok = 0; + else if (((ftp->ftp_passok == 3) || (ftp->ftp_passok == 1)) && + !strncmp(rptr, "230", 3)) { + ftp->ftp_passok = 4; + } else if ((ftp->ftp_passok == 3) && !strncmp(rptr, "530", 3)) + ftp->ftp_passok = 0; else if ((ftp->ftp_passok == 4) && !strncmp(rptr, "227 ", 4)) { inc = ippr_ftp_pasv(fin, ip, nat, f, dlen); } else if (ippr_ftp_insecure && !strncmp(rptr, "227 ", 4)) { |