1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-22 23:49:03 +00:00

Use 127.0.0.1 or ::1 where it counts.

This commit is contained in:
david
2013-08-16 08:03:10 +00:00
parent b76967c325
commit 70e96fb8ee

View File

@@ -429,12 +429,12 @@ test "Server default listen address and port",
sub { sub {
my $resp; my $resp;
my ($c_pid, $c_out, $c_in) = ncat($HOST); my ($c_pid, $c_out, $c_in) = ncat("127.0.0.1");
syswrite($c_in, "abc\n"); syswrite($c_in, "abc\n");
$resp = timeout_read($s_out); $resp = timeout_read($s_out);
$resp eq "abc\n" or die "Server got \"$resp\", not \"abc\\n\""; $resp eq "abc\n" or die "Server got \"$resp\", not \"abc\\n\"";
my ($c_pid2, $c_out2, $c_in2) = ncat("-6", $IPV6_ADDR); my ($c_pid2, $c_out2, $c_in2) = ncat("-6", "::1");
syswrite($c_in2, "abc\n"); syswrite($c_in2, "abc\n");
$resp = timeout_read($s_out); $resp = timeout_read($s_out);
$resp eq "abc\n" or die "Server got \"$resp\", not \"abc\\n\""; $resp eq "abc\n" or die "Server got \"$resp\", not \"abc\\n\"";
@@ -446,7 +446,7 @@ test "Server -4 default listen address and port",
sub { sub {
my $resp; my $resp;
my ($c_pid, $c_out, $c_in) = ncat($HOST); my ($c_pid, $c_out, $c_in) = ncat("127.0.0.1");
syswrite($c_in, "abc\n"); syswrite($c_in, "abc\n");
$resp = timeout_read($s_out); $resp = timeout_read($s_out);
$resp eq "abc\n" or die "Server got \"$resp\", not \"abc\\n\""; $resp eq "abc\n" or die "Server got \"$resp\", not \"abc\\n\"";