Fix engineID reprobe

Do not probe for engineID when we already know it
Reviewed-by: Craig Small <csmall@debian.org>
Last-Updated: 2019-02-07

Gbp-Pq: Name fix_engineid_reprobe.diff
This commit is contained in:
Net-SNMP Packaging Team 2022-06-27 15:01:26 +08:00 committed by Lu zhiping
parent 1d3b111af5
commit d36c9222cd
1 changed files with 5 additions and 0 deletions

View File

@ -3258,6 +3258,11 @@ int usm_discover_engineid(void *slpv, netsnmp_session *session) {
int status, i;
struct session_list *slp = (struct session_list *) slpv;
if (slp->session->securityEngineIDLen != 0) {
DEBUGMSGTL(("snmp_api", "engineID already known, skipping probe\n"));
return SNMPERR_SUCCESS;
}
if (usm_build_probe_pdu(&pdu) != 0) {
DEBUGMSGTL(("snmp_api", "unable to create probe PDU\n"));
return SNMP_ERR_GENERR;