mirror of
https://github.com/hybula/lookingglass.git
synced 2024-09-21 05:20:06 +00:00
commit
b1ccf61f61
|
@ -167,7 +167,7 @@ class LookingGlass
|
||||||
*/
|
*/
|
||||||
public static function ping(string $host, int $count = 4): bool
|
public static function ping(string $host, int $count = 4): bool
|
||||||
{
|
{
|
||||||
return self::procExecute('ping -c' . $count . ' -w15', $host);
|
return self::procExecute('ping -4 -c' . $count . ' -w15', $host);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -46,7 +46,7 @@ if (!empty($_POST)) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (in_array($_POST['backendMethod'], ['ping6', 'mtr6', 'traceroute6'])) {
|
if (in_array($_POST['backendMethod'], ['ping6', 'mtr6', 'traceroute6'])) {
|
||||||
if (!LookingGlass::isValidIpv6($_POST['targetHost']) ||
|
if (!LookingGlass::isValidIpv6($_POST['targetHost']) &&
|
||||||
!$targetHost = LookingGlass::isValidHost($_POST['targetHost'],LookingGlass::IPV6)
|
!$targetHost = LookingGlass::isValidHost($_POST['targetHost'],LookingGlass::IPV6)
|
||||||
) {
|
) {
|
||||||
exitErrorMessage('No valid IPv6 provided.');
|
exitErrorMessage('No valid IPv6 provided.');
|
||||||
|
|
Loading…
Reference in a new issue