netcat: make netcat-openbsd the default netcat (#19411)
The motivation for this change is the following: As gnu-netcat, e. g. does not support ipv6, it is not suitable as default netcat. This commit also fixes all obvious build issues caused by this change.
This commit is contained in:
@@ -299,9 +299,9 @@ let
|
||||
-pf /run/dhclient.pid \
|
||||
-v eth0 eth1
|
||||
|
||||
otherIP="$(${pkgs.netcat}/bin/netcat -clp 1234 || :)"
|
||||
otherIP="$(${pkgs.netcat}/bin/nc -l 1234 || :)"
|
||||
${pkgs.iputils}/bin/ping -I eth1 -c1 "$otherIP"
|
||||
echo "$otherIP reachable" | ${pkgs.netcat}/bin/netcat -clp 5678 || :
|
||||
echo "$otherIP reachable" | ${pkgs.netcat}/bin/nc -l 5678 || :
|
||||
'';
|
||||
|
||||
sysdDetectVirt = pkgs: ''
|
||||
@@ -461,11 +461,11 @@ in mapAttrs mkVBoxTest {
|
||||
my $test1IP = waitForIP_test1 1;
|
||||
my $test2IP = waitForIP_test2 1;
|
||||
|
||||
$machine->succeed("echo '$test2IP' | netcat -c '$test1IP' 1234");
|
||||
$machine->succeed("echo '$test1IP' | netcat -c '$test2IP' 1234");
|
||||
$machine->succeed("echo '$test2IP' | nc '$test1IP' 1234");
|
||||
$machine->succeed("echo '$test1IP' | nc '$test2IP' 1234");
|
||||
|
||||
$machine->waitUntilSucceeds("netcat -c '$test1IP' 5678 >&2");
|
||||
$machine->waitUntilSucceeds("netcat -c '$test2IP' 5678 >&2");
|
||||
$machine->waitUntilSucceeds("nc '$test1IP' 5678 >&2");
|
||||
$machine->waitUntilSucceeds("nc '$test2IP' 5678 >&2");
|
||||
|
||||
shutdownVM_test1;
|
||||
shutdownVM_test2;
|
||||
|
||||
Reference in New Issue
Block a user