diff -ruBbd cacti-0.8.6f/lib/snmp.php cacti-0.8.6f-patched/lib/snmp.php --- cacti-0.8.6f/lib/snmp.php 2005-06-30 23:45:49.000000000 -0400 +++ cacti-0.8.6f-patched/lib/snmp.php 2005-07-15 20:19:55.000000000 -0400 @@ -44,6 +44,11 @@ $retries = read_config_option("snmp_retries"); if ($retries == "") $retries = 3; + /* do not attempt to poll invalid combinations */ + if (($version == 0) || (($community == "") && ($version != 3))) { + return "U"; + } + if (snmp_get_method($version) == SNMP_METHOD_PHP) { /* make sure snmp* is verbose so we can see what types of data we are getting back */ @@ -73,7 +78,7 @@ if (read_config_option("snmp_version") == "ucd-snmp") { exec(read_config_option("path_snmpget") . " -O vt -v$version -t $timeout -r $retries $hostname:$port $snmp_auth $oid", $snmp_value); }else { - exec(read_config_option("path_snmpget") . " -O fntUev $snmp_auth -v $version -t $timeout -r $retries $hostname:$port $oid", $snmp_value); + exec(read_config_option("path_snmpget") . " -O fntev $snmp_auth -v $version -t $timeout -r $retries $hostname:$port $oid", $snmp_value); } }