На главную | Русская версия
Description:As I see, in RFC there is no accurate definition of the server answer after 227
message during passive mode connection establishing. The kernel module ip_conntrack_ftp search string,
which is used by most of ftp-servers: Original:
void pasv(void)
{
unsigned char x[6];
startlistening(x);
out_puts("227 =");
out_put(strnum,fmt_ulong(strnum,(unsigned long) x[0]));
out_puts(",");
out_put(strnum,fmt_ulong(strnum,(unsigned long) x[1]));
out_puts(",");
out_put(strnum,fmt_ulong(strnum,(unsigned long) x[2]));
out_puts(",");
out_put(strnum,fmt_ulong(strnum,(unsigned long) x[3]));
out_puts(",");
out_put(strnum,fmt_ulong(strnum,(unsigned long) x[4]));
out_puts(",");
out_put(strnum,fmt_ulong(strnum,(unsigned long) x[5]));
out_puts("\r\n");
}
After changing:
void pasv(void)
{
unsigned char x[6];
startlistening(x);
out_puts("227 Entering Passive Mode (");
out_put(strnum,fmt_ulong(strnum,(unsigned long) x[0]));
out_puts(",");
out_put(strnum,fmt_ulong(strnum,(unsigned long) x[1]));
out_puts(",");
out_put(strnum,fmt_ulong(strnum,(unsigned long) x[2]));
out_puts(",");
out_put(strnum,fmt_ulong(strnum,(unsigned long) x[3]));
out_puts(",");
out_put(strnum,fmt_ulong(strnum,(unsigned long) x[4]));
out_puts(",");
out_put(strnum,fmt_ulong(strnum,(unsigned long) x[5]));
out_puts(")\r\n");
}
Download:The patch: publicfile-0.52.conntrack-ftp.patch (27.01.03). Was tested only on RH9, but as I see, in the last kernel (2.6.1) nothing was changed. If you have corrections -- write me to article <at> lithium.opennet.ruLinks:
| ||||
|
articles <at> lithium.opennet.ru | ||||
|
| ||||