Skip to content

Commit

Permalink
Merge pull request #470 from tiiuae/mdm_agent_fix_iproute_get_buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
TIISR authored Jul 15, 2024
2 parents a42b07f + 137c735 commit 596ff72
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ def monitor_interfaces(self):
try:
# Hox! get() is a blocking call thus stop() doesn't
# have much affect when execution is blocked within get().
messages = self.__ipr.get()
# TODO - Using bufsize=-1 is broken in pyroute2 0.7.12
# NOTE - bufsize=-1 required to prevent "No buffer space available" error
messages = self.__ipr.get(bufsize=-1)
for msg in messages:
if msg["event"] == "RTM_NEWLINK" or msg["event"] == "RTM_DELLINK":
interface_info = self.__get_interface_info(msg)
Expand Down

0 comments on commit 596ff72

Please sign in to comment.