reset cached SNMP engine ID for node after receiving invalid engine ID error
authorVictor Kirhenshtein <victor@netxms.org>
Fri, 27 May 2016 19:57:54 +0000 (22:57 +0300)
committerVictor Kirhenshtein <victor@netxms.org>
Fri, 27 May 2016 19:57:54 +0000 (22:57 +0300)
src/server/core/node.cpp

index 1312241..f2185b3 100644 (file)
@@ -1303,6 +1303,14 @@ restart_agent_check:
                unlockProperties();
             }
          }
+         else if ((dwResult == SNMP_ERR_ENGINE_ID) && (m_snmpVersion == SNMP_VERSION_3))
+         {
+            // Reset authoritative engine data
+            lockProperties();
+            m_snmpSecurity->setAuthoritativeEngine(SNMP_Engine());
+            unlockProperties();
+            goto restart_agent_check;
+         }
          else
          {
             sendPollerMsg(dwRqId, POLLER_ERROR _T("SNMP agent unreachable\r\n"));