replace ping6 with ping

reason: after the upgrade of iputils from 20151218 to 20161105
functionality of ping6 and tracepath6 was merged into ping and tracepath.

Ping is now mostly a drop-in replacment for ping6, except that selecting a
specific interface is done by encoding it into the address (ex.: fe80::1%eth0)
rather then specifing it with the `-I` flag.

Changed files
+29 -35
nixos
pkgs
servers
monitoring
nagios
-6
nixos/modules/tasks/network-interfaces.nix
···
source = "${pkgs.iputils.out}/bin/ping";
capabilities = "cap_net_raw+p";
};
-
-
ping6 = {
-
source = "${pkgs.iputils.out}/bin/ping6";
-
capabilities = "cap_net_raw+p";
-
};
} else {
ping.source = "${pkgs.iputils.out}/bin/ping";
-
"ping6".source = "${pkgs.iputils.out}/bin/ping6";
};
# Set the host and domain names in the activation script. Don't
···
source = "${pkgs.iputils.out}/bin/ping";
capabilities = "cap_net_raw+p";
};
} else {
ping.source = "${pkgs.iputils.out}/bin/ping";
};
# Set the host and domain names in the activation script. Don't
+6 -6
nixos/tests/cjdns.nix
···
# ping a few times each to let the routing table establish itself
-
$alice->succeed("ping6 -c 4 $carolIp6");
-
$bob->succeed("ping6 -c 4 $carolIp6");
-
$carol->succeed("ping6 -c 4 $aliceIp6");
-
$carol->succeed("ping6 -c 4 $bobIp6");
-
$alice->succeed("ping6 -c 4 $bobIp6");
-
$bob->succeed("ping6 -c 4 $aliceIp6");
$alice->waitForUnit("httpd.service");
···
# ping a few times each to let the routing table establish itself
+
$alice->succeed("ping -c 4 $carolIp6");
+
$bob->succeed("ping -c 4 $carolIp6");
+
$carol->succeed("ping -c 4 $aliceIp6");
+
$carol->succeed("ping -c 4 $bobIp6");
+
$alice->succeed("ping -c 4 $bobIp6");
+
$bob->succeed("ping -c 4 $aliceIp6");
$alice->waitForUnit("httpd.service");
+1 -1
nixos/tests/containers-bridge.nix
···
"${containerIp6}" =~ /([^\/]+)\/([0-9+])/;
my $ip6 = $1;
chomp $ip6;
-
$machine->succeed("ping6 -n -c 1 $ip6");
$machine->succeed("curl --fail http://[$ip6]/ > /dev/null");
# Stop the container.
···
"${containerIp6}" =~ /([^\/]+)\/([0-9+])/;
my $ip6 = $1;
chomp $ip6;
+
$machine->succeed("ping -n -c 1 $ip6");
$machine->succeed("curl --fail http://[$ip6]/ > /dev/null");
# Stop the container.
+1 -1
nixos/tests/containers-extra_veth.nix
···
# Ping on main veth
$machine->succeed("ping -n -c 1 192.168.0.100");
-
$machine->succeed("ping6 -n -c 1 fc00::2");
# Ping on the first extra veth
$machine->succeed("ping -n -c 1 192.168.1.100 >&2");
···
# Ping on main veth
$machine->succeed("ping -n -c 1 192.168.0.100");
+
$machine->succeed("ping -n -c 1 fc00::2");
# Ping on the first extra veth
$machine->succeed("ping -n -c 1 192.168.1.100 >&2");
+1 -1
nixos/tests/containers-ipv6.nix
···
# multi-user.target, we should now be able to access it.
my $ip = "${localIp}";
chomp $ip;
-
$machine->succeed("ping6 -n -c 1 $ip");
$machine->succeed("curl --fail http://[$ip]/ > /dev/null");
# Stop the container.
···
# multi-user.target, we should now be able to access it.
my $ip = "${localIp}";
chomp $ip;
+
$machine->succeed("ping -n -c 1 $ip");
$machine->succeed("curl --fail http://[$ip]/ > /dev/null");
# Stop the container.
+6 -6
nixos/tests/ipv6.nix
···
}
subtest "loopback address", sub {
-
$client->succeed("ping6 -c 1 ::1 >&2");
-
$client->fail("ping6 -c 1 ::2 >&2");
};
subtest "local link addressing", sub {
my $clientIp = waitForAddress $client, "eth1", "link";
my $serverIp = waitForAddress $server, "eth1", "link";
-
$client->succeed("ping6 -c 1 -I eth1 $clientIp >&2");
-
$client->succeed("ping6 -c 1 -I eth1 $serverIp >&2");
};
subtest "global addressing", sub {
my $clientIp = waitForAddress $client, "eth1", "global";
my $serverIp = waitForAddress $server, "eth1", "global";
-
$client->succeed("ping6 -c 1 $clientIp >&2");
-
$client->succeed("ping6 -c 1 $serverIp >&2");
$client->succeed("curl --fail -g http://[$serverIp]");
$client->fail("curl --fail -g http://[$clientIp]");
};
···
}
subtest "loopback address", sub {
+
$client->succeed("ping -c 1 ::1 >&2");
+
$client->fail("ping -c 1 ::2 >&2");
};
subtest "local link addressing", sub {
my $clientIp = waitForAddress $client, "eth1", "link";
my $serverIp = waitForAddress $server, "eth1", "link";
+
$client->succeed("ping -c 1 $clientIp%eth1 >&2");
+
$client->succeed("ping -c 1 $serverIp%eth1 >&2");
};
subtest "global addressing", sub {
my $clientIp = waitForAddress $client, "eth1", "global";
my $serverIp = waitForAddress $server, "eth1", "global";
+
$client->succeed("ping -c 1 $clientIp >&2");
+
$client->succeed("ping -c 1 $serverIp >&2");
$client->succeed("curl --fail -g http://[$serverIp]");
$client->fail("curl --fail -g http://[$clientIp]");
};
+12 -12
nixos/tests/networking.nix
···
# Test vlan 1
$client->waitUntilSucceeds("ping -c 1 192.168.1.1");
$client->waitUntilSucceeds("ping -c 1 192.168.1.2");
-
$client->waitUntilSucceeds("ping6 -c 1 fd00:1234:5678:1::1");
-
$client->waitUntilSucceeds("ping6 -c 1 fd00:1234:5678:1::2");
$router->waitUntilSucceeds("ping -c 1 192.168.1.1");
$router->waitUntilSucceeds("ping -c 1 192.168.1.2");
-
$router->waitUntilSucceeds("ping6 -c 1 fd00:1234:5678:1::1");
-
$router->waitUntilSucceeds("ping6 -c 1 fd00:1234:5678:1::2");
# Test vlan 2
$client->waitUntilSucceeds("ping -c 1 192.168.2.1");
$client->waitUntilSucceeds("ping -c 1 192.168.2.2");
-
$client->waitUntilSucceeds("ping6 -c 1 fd00:1234:5678:2::1");
-
$client->waitUntilSucceeds("ping6 -c 1 fd00:1234:5678:2::2");
$router->waitUntilSucceeds("ping -c 1 192.168.2.1");
$router->waitUntilSucceeds("ping -c 1 192.168.2.2");
-
$router->waitUntilSucceeds("ping6 -c 1 fd00:1234:5678:2::1");
-
$router->waitUntilSucceeds("ping6 -c 1 fd00:1234:5678:2::2");
'';
};
dhcpOneIf = {
···
$client2->succeed("ip addr >&2");
# Test ipv6
-
$client1->waitUntilSucceeds("ping6 -c 1 fc00::1");
-
$client1->waitUntilSucceeds("ping6 -c 1 fc00::2");
-
$client2->waitUntilSucceeds("ping6 -c 1 fc00::1");
-
$client2->waitUntilSucceeds("ping6 -c 1 fc00::2");
'';
};
vlan = let
···
# Test vlan 1
$client->waitUntilSucceeds("ping -c 1 192.168.1.1");
$client->waitUntilSucceeds("ping -c 1 192.168.1.2");
+
$client->waitUntilSucceeds("ping -c 1 fd00:1234:5678:1::1");
+
$client->waitUntilSucceeds("ping -c 1 fd00:1234:5678:1::2");
$router->waitUntilSucceeds("ping -c 1 192.168.1.1");
$router->waitUntilSucceeds("ping -c 1 192.168.1.2");
+
$router->waitUntilSucceeds("ping -c 1 fd00:1234:5678:1::1");
+
$router->waitUntilSucceeds("ping -c 1 fd00:1234:5678:1::2");
# Test vlan 2
$client->waitUntilSucceeds("ping -c 1 192.168.2.1");
$client->waitUntilSucceeds("ping -c 1 192.168.2.2");
+
$client->waitUntilSucceeds("ping -c 1 fd00:1234:5678:2::1");
+
$client->waitUntilSucceeds("ping -c 1 fd00:1234:5678:2::2");
$router->waitUntilSucceeds("ping -c 1 192.168.2.1");
$router->waitUntilSucceeds("ping -c 1 192.168.2.2");
+
$router->waitUntilSucceeds("ping -c 1 fd00:1234:5678:2::1");
+
$router->waitUntilSucceeds("ping -c 1 fd00:1234:5678:2::2");
'';
};
dhcpOneIf = {
···
$client2->succeed("ip addr >&2");
# Test ipv6
+
$client1->waitUntilSucceeds("ping -c 1 fc00::1");
+
$client1->waitUntilSucceeds("ping -c 1 fc00::2");
+
$client2->waitUntilSucceeds("ping -c 1 fc00::1");
+
$client2->waitUntilSucceeds("ping -c 1 fc00::2");
'';
};
vlan = let
+2 -2
pkgs/servers/monitoring/nagios/plugins/official-2.x.nix
···
# configured on the build machine).
preConfigure= "
configureFlagsArray=(
-
--with-ping-command='/run/wrappers/bin/ping -n -U -w %d -c %d %s'
-
--with-ping6-command='/run/wrappers/bin/ping6 -n -U -w %d -c %d %s'
)
";
···
# configured on the build machine).
preConfigure= "
configureFlagsArray=(
+
--with-ping-command='/run/wrappers/bin/ping -4 -n -U -w %d -c %d %s'
+
--with-ping6-command='/run/wrappers/bin/ping -6 -n -U -w %d -c %d %s'
)
";