Incorrect discovery proceedure for SNMPv3 with auth.
Status: Beta
Brought to you by:
msinadinovic
Discovery with SNMPv3 is a two phase process. First you must send a packet with an incorrect msgAuthoritativeEngineID so the agent will send back the proper snmpEngineID.
Then a second request with the proper engineID but also containing proper authentication parameters but be send before the EngineBoots and EngineTime will be send back.
Some devices do not care about the second phase (IBM Blade Centers for example) and will just end all three values with the first discovery. Cisco devices running NX-OS on the other hand requires both requests.
I have made some modifications to a local copy so I can continue development on a project that utilizes this library. I can see multiple ways to correct this issue in code but selected one that simply looked at the provided params and if the security params were included it would run both discoveries. Otherwise it would work as it had been before and only run the single discovery.
I have confirmed that NX-OS devices require the 2 phase discovery. Support is implemented for blocking requests (UdpTarget.Request(...) method) in the soon to be released ver 0.8.6 version of the library. I'll have to spend a little more time looking at the async discovery method to see how to safely implement it there.