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

Notification filtering based on snmpNotifyFilterProfileTable and snmpNotifyFilterTable is not working #342

Closed
porobd opened this issue Sep 7, 2021 · 4 comments

Comments

@porobd
Copy link

porobd commented Sep 7, 2021

This was working in net-snmp 5.7 but has stopped working in net-snmp 5.9. As far as I could understand there are 2 issues:

  1. The ncompare method (which is used to compare partial indices in a table) pointer was not set for the container used to store the filter information. I changed snmplib/container.c to assign a default ncompare method pointer (the same way a default compare method pointer is assigned) when finding a container (i.e. in method netsnmp_container_find).

  2. The notification filter information is stored in one container but during filtering, a different container is being used to look for matching filters. I changed agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_storage.h and agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_access.c to expose the data_storage method that creates the container (used when actual filtering) so that this method can be used when creating the container used to store the notification filters.

Changes are included in the attached file.
notification_filtering.txt

bvanassche added a commit that referenced this issue Sep 8, 2021
The notification filter information is stored in one container but during
filtering, a different container is being used to look for matching filters.
Change agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_storage.h
and agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_access.c
to expose the data_storage method that creates the container (used when
actual filtering) so that this method can be used when creating the
container used to store the notification filters.

Fixes: #342
@bvanassche
Copy link
Contributor

Please take a look at commits 64a88cc and 1672d70.

@porobd
Copy link
Author

porobd commented Sep 8, 2021

The commits look good to me. This might be a basic question and pardon me since I am new to the process here. But, how does this change become part of the 5.9.1 code base at https://sourceforge.net/projects/net-snmp/files/net-snmp/5.9.1/ ?

@bvanassche
Copy link
Contributor

That's a great question. Version 5.9.1 has been released and won't be modified. A conversation is ongoing about the next release. I think that the next release will be assigned version number 5.9.2 and that it will come from the v5.9 branch. It may take a few months however before version 5.9.2 is released.

@porobd
Copy link
Author

porobd commented Sep 9, 2021

Thank you for the clarification; that helps.

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

No branches or pull requests

2 participants