Subject: Re: kern/7368: ipnat not rewriting PORT command 100% of time
To: Greg A. Woods <woods@weird.com>
From: Andrew Brown <atatat@atatdot.net>
List: netbsd-bugs
Date: 04/15/1999 03:49:42
>and after looking at ip_ftp_pxy.c line 144+8, it looks like i just
>wanna remove that chunk (or something). it'll probably fix my
>problem. and i think that ftp clients that don't send the crlf are
>dumb (it *is* linux, after all), but clients that will actually "lose"
>after a "fix" like this actually *deserve* to lose. it means that
>they're sending the bytes of the port command piece meal.
to follow up...this actually works. so my fix is here:
---------8<---------8<---------8<---------8<---------8<---------
--- ip_ftp_pxy.c.orig Mon Nov 23 07:15:09 1998
+++ ip_ftp_pxy.c Thu Apr 15 03:47:32 1999
@@ -144,11 +144,11 @@
/*
* check for CR-LF at the end.
*/
- if (((*s == '\r') && (*(s + 1) == '\n')) ||
- ((*(s - 1) == '\r') && (*s == '\n')))
+ /* if (((*s == '\r') && (*(s + 1) == '\n')) ||
+ ((*(s - 1) == '\r') && (*s == '\n'))) */
a6 = a5 & 0xff;
- else
- return 0;
+ /* else
+ return 0; */
a5 >>= 8;
/*
* Calculate new address parts for PORT command
---------8<---------8<---------8<---------8<---------8<---------
and my rant stands. :)
some people may not like it, but...well...
--
|-----< "CODE WARRIOR" >-----|
codewarrior@daemon.org * "ah! i see you have the internet
twofsonet@graffiti.com (Andrew Brown) that goes *ping*!"
andrew@crossbar.com * "information is power -- share the wealth."