From 8267094825921513aa46fa01b95478f62de387da Mon Sep 17 00:00:00 2001 From: Kim-Eirik Karlsen Date: Tue, 27 Dec 2022 00:23:52 +0100 Subject: [PATCH 1/3] Specify ipv4 for ping as the dns resolv of ping may default to ipv6 unless specified. --- LookingGlass.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LookingGlass.php b/LookingGlass.php index d0ba507..b4e303b 100644 --- a/LookingGlass.php +++ b/LookingGlass.php @@ -167,7 +167,7 @@ class LookingGlass */ 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); } /** From a82b94332b44291a3d67eb9cc9a1f7252432f1f0 Mon Sep 17 00:00:00 2001 From: Kim-Eirik Karlsen Date: Tue, 27 Dec 2022 00:24:31 +0100 Subject: [PATCH 2/3] Should be &&, just like for the ipv4 equivalent above. --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index 42cfac9..f9df417 100644 --- a/index.php +++ b/index.php @@ -46,7 +46,7 @@ if (!empty($_POST)) { } 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) ) { exitErrorMessage('No valid IPv6 provided.'); From 7bdccec9717304180a97bd451f8acafbf37c5745 Mon Sep 17 00:00:00 2001 From: Tamer <8611981+dqos@users.noreply.github.com> Date: Tue, 27 Dec 2022 10:26:13 +0100 Subject: [PATCH 3/3] Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e9a60df..fadf6f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## 1.1.1 - 2022-12-27 +### Fixed +- Fix IPv6 issues thanks to @kimma. + ## 1.1.0 - 2022-11-23 ### Fixed - Changelog date format adjusted to ISO 8601.