-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Failed to load MIB module #147
Comments
Hello! One of your MIBs has a bug. Specifically, your error log shows that TIMETRA-FILTER-MIB has an object type TIPFilterParamsFwdSdpBind which has a DEFVAL value whose size is not allowed by the SYNTAX for that object type. Right now, pysmi is not able to detect that problem while compiling the MIB. As a result, pysnmp trips over the problem when loading the compiled version. I hope to adapt pysmi to discard such invalid DEFVAL values (as it already does for some cases), so that you can still compile and load MIBs that have such bugs. I have already made some progress on that front, but it will take a while longer. For now, your best option is to edit your copy of TIMETRA-FILTER-MIB and comment out the DEFVAL line for TIPFilterParamsFwdSdpBind (and perhaps for other object types that have the same problem). |
Thanks for your reply. I'm not sure what to comment on. See my MIB attached: |
Ah sorry, I was not clear enough. Your attachment is the Python code for that MIB, as generated by pysmi. That file has been generated from the original ASN.1 input MIB, which is also called TIMETRA-FILTER-MIB. That file basically looks like this, although note that your copy might be slightly different, depending on where you got it from. If you never downloaded that TIMETRA-FILTER-MIB file yourself, and instead let pysmi "borrow" the MIB, then you would have to download a copy first, so that you can edit it. In that case you have to make sure that pysmi uses your local copy. Either way, it is that original ASN.1 file that you would have to edit, by searching for TIPFilterParamsFwdSdpBind and adding two dashes ("--") in front of the DEFVAL line below it. For example, in this case, you'd have to change line 1198 to As last resort, you can also edit the generated Python code that you attached. Then you would have to remove line 1605, which reads |
This workaround works. |
Expected behavior
I want to load des MIBs when my SNMP server starts
Actual behavior
Loading modules fails.
Detailed steps
But loading modules fails.
Python package information
Operating system information
Linux
Python information
3.12
(Optional) Contents of your test script
Relevant log output
The text was updated successfully, but these errors were encountered: