Fix bug #49136: No SNMPv2 SetRequest response when OID does not exist

This commit is contained in:
Dirk Ziegelmeier 2016-09-20 14:06:20 +02:00
parent eb3a08308d
commit 19e2780656

View File

@ -525,6 +525,9 @@ snmp_process_set_request(struct snmp_request *request)
if (node_instance.release_instance != NULL) {
node_instance.release_instance(&node_instance);
}
} else if ((request->error_status == SNMP_ERR_NOSUCHINSTANCE) || (request->error_status == SNMP_ERR_NOSUCHOBJECT) || (request->error_status == SNMP_ERR_ENDOFMIBVIEW)) {
/* according to RFC 1905 (4.2.5. The SetRequest-PDU) return 'NotWritable' for unknown OIDs */
request->error_status = SNMP_ERR_NOTWRITABLE;
}
} else if (err == SNMP_VB_ENUMERATOR_ERR_EOVB) {
/* no more varbinds in request */