Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SNMP v1/v2c regression in async libraries #2763

Merged
merged 1 commit into from
Nov 24, 2023

Conversation

lunkwill42
Copy link
Member

@lunkwill42 lunkwill42 commented Nov 24, 2023

The SNMPParameters class expects its SNMP version attribute to be an integer. However, some (or perhaps all) SNMPv1/v2c management profiles tend to store the version numbers as strings, for some reason.

The net result is that the as_agentproxy_args() method would fail to provide a community argument to SNMP v1/v2 sessions because it was unable to compare an integer version number to a string. This would cause ipdevpoll/navoidverify/naventity to always use public as the SNMP community of all v1/v2c sessions.

Fortunately, this did not make it into a release.

The SNMPParameters class expects its SNMP version attribute to be
an integer.  However, some (or perhaps all) SNMPv1/v2c management
profiles tend to store the version numbers as strings, for some reason.

The net result is that the `as_agentproxy_args()` method would fail
to provide a `community` argument to SNMP v1/v2 sessions because it
was unable to compare an integer version number to a string.
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link

codecov bot commented Nov 24, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (921a081) 56.04% compared to head (f52ca20) 56.04%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2763   +/-   ##
=======================================
  Coverage   56.04%   56.04%           
=======================================
  Files         567      567           
  Lines       41250    41251    +1     
=======================================
+ Hits        23117    23118    +1     
  Misses      18133    18133           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lunkwill42 lunkwill42 merged commit ccd4e13 into master Nov 24, 2023
19 checks passed
@lunkwill42 lunkwill42 deleted the bugfix/snmp-parameters-int-version branch November 24, 2023 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants