aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorM.Gergő2020-05-25 19:45:03 +0200
committerM.Gergő2020-05-25 19:45:03 +0200
commit680f80067e05fcd1b79b3b8689060c5465eea473 (patch)
tree36a19aebbe0bea095348719b79685c07a08fb592
parentb524a2311fd57d01f5023d3a45d470c1e3bf7d4f (diff)
downloadmunin-unifi-680f80067e05fcd1b79b3b8689060c5465eea473.tar.gz
munin-unifi-680f80067e05fcd1b79b3b8689060c5465eea473.zip
Comments
-rw-r--r--ubnt_unifi.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/ubnt_unifi.php b/ubnt_unifi.php
index 61fa0b9..f76badb 100644
--- a/ubnt_unifi.php
+++ b/ubnt_unifi.php
@@ -434,7 +434,7 @@ return $ret;
-
+/********************* START *******************/
$hosts = explode(" ", $hosts);
@@ -443,16 +443,14 @@ $mask = @explode('/', $devnetw)[1];
$hosts2 = array();
$hostsip = array();
-echo "\n netmask \n";
if($mask != 0 ){
for($i=1; $i<(1 << (32 - $mask)); $i++ ){ // fetch ip addresses from given network and mask
$hosts2[] = long2ip((ip2long($netw) & ~((1 << (32 - $mask)) -1)) +$i ) ;
}
}
-echo "\nhosts\n"; /******* */
foreach($hosts as $key => $val){ // delete addresses which are given by hostname
- echo "\t$val\n"; /************ */
+
$hostsip[$key] = array();
$hostsip[$key]['hs'] = $val;
putenv('RES_OPTIONS="retrans:1 retry:1 timeout:1 attempts:1"'); //faster name resolving ?