diff options
author | Simon Rettberg | 2024-06-04 14:50:22 +0200 |
---|---|---|
committer | Simon Rettberg | 2024-06-04 14:50:22 +0200 |
commit | 562cceff6873389babac68c7bcb6917d2a6f9d17 (patch) | |
tree | 6b8c02231e583e2159dd553811aea72bee2beb78 /modules-available/dnbd3 | |
parent | [dnbd3] No such slx variable :) (diff) | |
download | slx-admin-562cceff6873389babac68c7bcb6917d2a6f9d17.tar.gz slx-admin-562cceff6873389babac68c7bcb6917d2a6f9d17.tar.xz slx-admin-562cceff6873389babac68c7bcb6917d2a6f9d17.zip |
[dnbd3] Ignore servers with 0.0.0.0
This happens if you reset a client in the statistics module. Until the
according client reboots and gets a proper IP assigned again, ignore it
for polling and delivery in client config.
Diffstat (limited to 'modules-available/dnbd3')
-rw-r--r-- | modules-available/dnbd3/baseconfig/getconfig.inc.php | 2 | ||||
-rw-r--r-- | modules-available/dnbd3/inc/dnbd3rpc.inc.php | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/modules-available/dnbd3/baseconfig/getconfig.inc.php b/modules-available/dnbd3/baseconfig/getconfig.inc.php index eff821fc..dbc3671d 100644 --- a/modules-available/dnbd3/baseconfig/getconfig.inc.php +++ b/modules-available/dnbd3/baseconfig/getconfig.inc.php @@ -36,6 +36,8 @@ foreach ($res as $row) { if ($row['fixedip'] === '<self>') { $row['fixedip'] = Property::getServerIp(); $defPrio = Dnbd3::preferLocal() ? 500 : 2000; + } elseif ($row['fixedip'] === '0.0.0.0') { + continue; } else { $defPrio = 1000; } diff --git a/modules-available/dnbd3/inc/dnbd3rpc.inc.php b/modules-available/dnbd3/inc/dnbd3rpc.inc.php index f6bbf0ca..69437304 100644 --- a/modules-available/dnbd3/inc/dnbd3rpc.inc.php +++ b/modules-available/dnbd3/inc/dnbd3rpc.inc.php @@ -34,6 +34,8 @@ class Dnbd3Rpc { */ public static function query(string $server, array $queryOptions) { + if ($server === '0.0.0.0') + return self::ERROR_UNREACHABLE; $server = self::translateServer($server); $url = 'http://' . $server . '/query?q=version'; if (!empty($queryOptions)) { @@ -79,6 +81,8 @@ class Dnbd3Rpc { curl_multi_setopt($mh, CURLMOPT_MAX_HOST_CONNECTIONS, 2); curl_multi_setopt($mh, CURLMOPT_MAX_TOTAL_CONNECTIONS, 8); foreach ($servers as $server) { + if ($server === '0.0.0.0') + continue; $url = 'http://' . self::translateServer($server) . '/query?q=version' . $extra; $res = curl_init($url); if ($res === false) { |