lextudio / sharpsnmplib

Sharp SNMP Library- Open Source SNMP for .NET
https://sharpsnmp.com
MIT License
356 stars 152 forks source link

Unable to receive SNMPv3 traps #215

Closed lextudio-support closed 4 hours ago

lextudio-support commented 4 hours ago

Hello,

I'm trying to implement SNMPv3 trap functionality for agent and management station. In this case it's just the adapted sample snmpd and snmptrapd applications while evaluating.

The whole process gets aborted while the incoming trap message is being processed at SecureSnmpContext.cs:192 where the check for presence of the Reportable flag in the received trap message fails:

if ((user.ToSecurityLevel() | Levels.Reportable) != request.Header.SecurityLevel)
{
  HandleFailure(Group.UnsupportedSecurityLevel);
  return false;
}

And Wireshark tells me this via the telegram info:

report SNMP-USER-BASED-SM-MIB::usmStatsUnsupportedSecLevels.0

According to RFC 3412 section 6.4 the Reportable flag must never be set for SNMPv2 trap PDUs. Can you please give some hints on how to implement SNMPv3 trap reception correctly using #SNMP?

By the way, the library's assembly version is 8.9.010914.01.

Thanks a lot, Kristian Virkus

Original Reported Date: 2015-09-14T02:01:27.067-07:00 Planned For Release:

Original CodePlex ID: 7281

lextudio-support commented 4 hours ago

Copied from CodePlex without authors:

https://github.com/lextm/sharpsnmplib/commit/c55d7a46eec74bf78182b8085af7f6e6317374e0

Fixed here.

Original Posted Date: 2015-09-18T22:06:41.183-07:00

lextudio-support commented 4 hours ago

Original Closed Date: 2015-09-18T22:06:50.933-07:00