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

Leak in VACM context table #149

Open
optimosfet opened this issue Apr 18, 2018 · 4 comments
Open

Leak in VACM context table #149

optimosfet opened this issue Apr 18, 2018 · 4 comments

Comments

@optimosfet
Copy link

Hi Ilya,

are there any considerations from your side to fix the following leak?

addContext(snmpEngine, contextName) # this is leaky

Regards,
Andreas

@etingof
Copy link
Owner

etingof commented Apr 21, 2018

Hey, thanks for your nitpicking! ;-)

Do you actually notice this leak? It leaks noticeably when you register a whole lot of different context names.

The problem here is that SNMP-VIEW-BASED-ACM-MIB::vacmContextTable does not define RowStatus column which would let us remove the unwanted rows. Perhaps we could add that column into the Python module and introduce the delContext() call accordingly.

But my question is if there is actually a use-case where it makes a difference?

@optimosfet
Copy link
Author

Hi Ilya,

I actually got in to trouble with this leak. I recently sent you an email with my application description on March 28th. Maybe you remember the SNMP agent proxy ...

The proxy is an accessor for IoT nodes in a meshed network topology. The nodes appear dynamically using some kind of IPv6 neighbor discovery. Each node has an UID, which is used also as SNMP context identifier.

If now a branch of the network is removed, the VACM and related entries are remaining in the MIB tree...

@etingof
Copy link
Owner

etingof commented Apr 24, 2018

Let's try #155, the same fix is also committed to the 4.4.5 branch.

@optimosfet
Copy link
Author

Thanks, this helps to get rid of outdated context table entries.

The next potentially leaky code section might be in addVacmUser(...), resp. delVacmUser(...).
The latter has no parameter for the context name, which is why the entries in the VACM Access Table are not completely cleared.

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