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

MDM Agent: Use auto-calculated buffer size in IPRoute.get() call #470

Merged
merged 1 commit into from
Jul 15, 2024

Conversation

pentestiing
Copy link
Contributor

@pentestiing pentestiing commented Jul 15, 2024

The title 🆙

Apparently in some cases the call to IPRoute.get() might result in No buffer space available:

File "/opt/nats/src/comms_if_monitor.py", line 67, in monitor_interfaces
messages = self.__ipr.get()
File "/usr/lib/python3.9/site-packages/pyroute2/netlink/nlsocket.py", line 376, in get
File "/usr/lib/python3.9/site-packages/pyroute2/netlink/nlsocket.py", line 776, in get
File "/usr/lib/python3.9/site-packages/pyroute2/netlink/nlsocket.py", line 554, in recv_ft
OSError: [Errno 105] No buffer space available

To workaround this issue we are making the bufsize autodetectable.

It shall be noted that this feature seems to be broken in pyroute2 version 0.7.12, but the versions included in iMX8 and RPIOS are lower, so a TODO has been added in the line for future changes.

Documentation: https://docs.pyroute2.org/nlsocket.html#pyroute2.netlink.nlsocket.NetlinkSocketBaseSafe.get

Jira-ID: SECO-6713

🔮

Copy link

@METII99 METII99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🦬

@TIISR TIISR merged commit 596ff72 into develop Jul 15, 2024
0 of 2 checks passed
@TIISR TIISR deleted the mdm_agent_fix_iproute_get_buffer branch July 15, 2024 12:59
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

Successfully merging this pull request may close these issues.

3 participants