Revert change committed on Mon May 4 09:30:23 2009 UTC.

The origin of the problem with test case #251 was the --ftp-port not being the CLIENTIP address.
This commit is contained in:
Yang Tse
2009-05-05 08:46:31 +00:00
parent b40b989523
commit a840cc700a
2 changed files with 20 additions and 30 deletions

View File

@@ -83,7 +83,6 @@ my $ext; # append to log/pid file names
my $grok_eprt;
my $port = 8921; # just a default
my $listenaddr = "127.0.0.1"; # just a default
my $client;
my $pidfile = ".ftpd.pid"; # a default, use --pidfile
my $SERVERLOGS_LOCK="log/serverlogs.lock"; # server logs advisor read lock
@@ -118,11 +117,6 @@ do {
$listenaddr =~ s/^\[(.*)\]$/\1/;
shift @ARGV;
}
elsif($ARGV[0] eq "--client") {
$client = $ARGV[1];
$client =~ s/^\[(.*)\]$/\1/;
shift @ARGV;
}
} while(shift @ARGV);
sub catch_zap {
@@ -369,8 +363,8 @@ sub MDTM_command {
my $testno = $_[0];
my $testpart = "";
if ($testno > 10000) {
$testpart = $testno % 10000;
$testno = int($testno / 10000);
$testpart = $testno % 10000;
$testno = int($testno / 10000);
}
loadtest("$srcdir/data/test$testno");
@@ -396,8 +390,8 @@ sub SIZE_command {
my $testno = $_[0];
my $testpart = "";
if ($testno > 10000) {
$testpart = $testno % 10000;
$testno = int($testno / 10000);
$testpart = $testno % 10000;
$testno = int($testno / 10000);
}
loadtest("$srcdir/data/test$testno");
@@ -458,8 +452,8 @@ sub RETR_command {
$testno =~ s/^([^0-9]*)//;
my $testpart = "";
if ($testno > 10000) {
$testpart = $testno % 10000;
$testno = int($testno / 10000);
$testpart = $testno % 10000;
$testno = int($testno / 10000);
}
loadtest("$srcdir/data/test$testno");
@@ -637,22 +631,22 @@ sub PASV_command {
eval {
local $SIG{ALRM} = sub { die "alarm\n" };
# assume swift operations unless explicitly slow
alarm ($controldelay?20:10);
# assume swift operations unless explicitly slow
alarm ($controldelay?20:10);
# Wait for 'CNCT'
my $input;
my $input;
while(sysread(DREAD, $input, 5)) {
if($input !~ /^CNCT/) {
# we wait for a connected client
logmsg "Odd, we got $input from client\n";
next;
}
logmsg "====> Client DATA connect\n";
last;
}
if($input !~ /^CNCT/) {
# we wait for a connected client
logmsg "Odd, we got $input from client\n";
next;
}
logmsg "====> Client DATA connect\n";
last;
}
alarm 0;
};
if ($@) {
@@ -711,7 +705,7 @@ sub PORT_command {
# We fire up a new sockfilt to do the data transfer for us.
# FIX: make it use IPv6 if need be
my $filtcmd="./server/sockfilt --connect $port --addr $client --logfile log/sockdata$ftpdnum$ext.log --pidfile .sockdata$ftpdnum$ext.pid $ipv6";
my $filtcmd="./server/sockfilt --connect $port --addr $addr --logfile log/sockdata$ftpdnum$ext.log --pidfile .sockdata$ftpdnum$ext.pid $ipv6";
$slavepid = open2(\*DREAD, \*DWRITE, $filtcmd);
print STDERR "$filtcmd\n" if($verbose);