Created attachment 223197 [details] fix for mibII definitions for bsnmpget/walk Found an issue when using info-level logging with bsnmpget and bsnmpd. I'm running a local network utilization monitor and found a discrepancy with /usr/share/snmp/defs/mibII_tree.def, what bsnmpget uses to retrieve MIBs. If syslog is set to user.info the following message appears with the default configuration when trying to pull entries referenced in mibII_tree.def: Mar 12 00:37:07 <user.info> socrates bsnmpget: Matching OIDs with different string mappings: old - mib2, new - mibII This seems to be because mibII_tree.def lists its MIBs, like the log says, under mib2 and not mibII. Applied the attached patch and I no longer receive these superfluous log messages. Thanks! Michael Proto
Created attachment 223198 [details] updated patch earlier patch was reversed, this is the correct patch
For reference I was able to expose this by enabling bsnmpd on my system and running locally (after enabling user.info logging via syslogd): bsnmpget -p getbulk -s stream::public@ ifName
I also just saw this now while debugging a bsnmpget problem. @syrinx, do you want to check and commit this or should I?
Created attachment 236198 [details] Proposed final mib-2 patch
This is an issue we've had for years now, and after looking again at it I would suggest we should follow the standard definition from RFC2578 - mib-2 OBJECT IDENTIFIER ::= { mgmt 1 } and list the definitions under mib-2 . Proposed final patch is in the attachment.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=4ac8f4067096a9d4a00e41cd53bd5c4fa295fd15 commit 4ac8f4067096a9d4a00e41cd53bd5c4fa295fd15 Author: Shteryana Shopova <syrinx@FreeBSD.org> AuthorDate: 2022-12-29 19:52:46 +0000 Commit: Shteryana Shopova <syrinx@FreeBSD.org> CommitDate: 2022-12-29 20:02:27 +0000 Follow the standard object definition from RFC2578 Use mib-2 throughout the files where applicable PR: 254231 Reported by: Michael Proto Reviewed by: bz (at) FreeBSD (dot) org contrib/bsnmp/gensnmptree/gensnmptree.1 | 2 +- contrib/bsnmp/snmp_mibII/mibII_tree.def | 2 +- contrib/bsnmp/snmpd/tree.def | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
Any more to do here, or can we close this as fixed? Thanks
Fixed from my perspective.