diff --git a/includes/functions.php b/includes/functions.php index a98b5bfd37..8c3acfe930 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -276,7 +276,7 @@ function addHost($host, $snmpver, $port = '161', $transport = 'udp', $quiet = '0 if (ip_exists($ip) === false) { // Test reachability $address_family = snmpTransportToAddressFamily($transport); - if ($force_add == 1 || isPingable($host, $addressFamily)) { + if ($force_add == 1 || isPingable($host, $address_family)) { if (empty($snmpver)) { // Try SNMPv2c $snmpver = 'v2c';