OCSInventory-NG / OCSInventory-ocsreports

Webconsole for OCS Inventory NG
https://www.ocsinventory-ng.org
GNU General Public License v2.0
229 stars 150 forks source link

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

Closed bud4 closed 11 months ago

bud4 commented 1 year ago

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

Lea9250 commented 1 year ago

Hi @bud4,

I was able to reproduce the issue with the Unix agent. I proposed a fix for it (see https://github.com/OCSInventory-NG/UnixAgent/pull/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 commented 11 months ago

Hi @bud4 ,

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

Best regards, Charlene