mirror of
https://github.com/curl/curl.git
synced 2026-08-26 04:13:31 +03:00
Allow setting the IP address on which to listen for connections.
This commit is contained in:
parent
551abba277
commit
0ed57d370d
2 changed files with 14 additions and 3 deletions
|
|
@ -82,6 +82,7 @@ my $ipv6;
|
|||
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 $pidfile = ".ftpd.pid"; # a default, use --pidfile
|
||||
|
||||
do {
|
||||
|
|
@ -109,6 +110,10 @@ do {
|
|||
$port = $ARGV[1];
|
||||
shift @ARGV;
|
||||
}
|
||||
elsif($ARGV[0] eq "--addr") {
|
||||
$listenaddr = $ARGV[1];
|
||||
shift @ARGV;
|
||||
}
|
||||
} while(shift @ARGV);
|
||||
|
||||
sub catch_zap {
|
||||
|
|
@ -569,7 +574,8 @@ sub PASV_command {
|
|||
|
||||
if($cmd ne "EPSV") {
|
||||
# PASV reply
|
||||
my $p="127,0,0,1";
|
||||
my $p=$listenaddr;
|
||||
$p =~ s/\./,/g;
|
||||
if($pasvbadip) {
|
||||
$p="1,2,3,4";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue