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

[BUG] SNMP scan read wrong value .incorrect values read if contain the character : #1540

Closed
bud4 opened this issue Jul 14, 2023 · 2 comments
Closed

Comments

@bud4
Copy link

bud4 commented Jul 14, 2023

OCS Inventory version
Version :

SNMP scan read wrong value .incorrect reading of the values if they contain the character :
snmp : reading the value of the value in the OID .1.3.6.1.2.1.2.2.1.6 (mac) is wrong , only the substring of MAC which is after the first : is saved in the db

To Reproduce
Steps to reproduce the behavior:
configure reading of oid .1.3.6.1.2.1.2.2.1
the value stored in db is wrong
test: output of snmpwalk
snmpwalk -v 2c -On -c public 172.30.41.16 .1.3.6.1.2.1.2.2.1.6
.1.3.6.1.2.1.2.2.1.6.1 = STRING: 9c:93:4e:bc:10:6d
.1.3.6.1.2.1.2.2.1.6.2 = STRING:
.1.3.6.1.2.1.2.2.1.6.3 = STRING:
value stored in db 93:4e:bc:10:6d

Expected behavior
show the value 9c:93:4e:bc:10:6d

Screenshots
Istantanea_2023-07-14_15-56-10

@bud4 bud4 changed the title [BUG] [BUG] SNMP scan read wrong value .incorrect values read if contain the character : Jul 14, 2023
@Lea9250
Copy link
Contributor

Lea9250 commented Sep 11, 2023

Hi @bud4,

I was able to reproduce the issue with the Unix agent. I proposed a fix for it (see OCSInventory-NG/UnixAgent#451). You can apply the changes locally if you want to test this out before it is merged.
The fix should be implemented in the next release of the Unix agent.

Regards,
Léa

@charleneauger
Copy link
Member

Hi @bud4 ,

This issue has been fixed.
The fix will be available in the next release of the Unix agent.

Best regards,
Charlene

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants