Restore check that the MIB leaf is accessible when validating AUTOLOAD method calls

Restore corresponding test
Move live snmp_connect_ip() test to 10_remote_snmplabs.t so that tests requiring Internet access are within one file
This commit is contained in:
Eric A. Miller
2018-04-11 21:09:57 -04:00
parent 75dcf74148
commit facdf0aafe
3 changed files with 17 additions and 22 deletions

View File

@@ -4625,7 +4625,8 @@ sub _validate_autoload_method {
# If we were given a fully qualified OID because we don't have the MIB
# file, it will translate above but we won't be able to check access so
# skip the check and return
if ($access && $method =~ /^set/ && $access !~ /Write|Create/) {
if ($access && ($method =~ /^set/ && $access !~ /Write|Create/)
|| ($method !~ /^set/ && $access eq 'NoAccess')) {
print
"SNMP::Info::_validate_autoload_method($attr : $oid) Not accessable for requested operation.\n"