Skip to content

Commit

Permalink
netlink: improved event handling
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmm committed Sep 10, 2024
1 parent 7490646 commit 880e9b8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/netlink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ void Netlink::handle_events() {

auto* nlmsg_hdr = reinterpret_cast<nlmsghdr*>(buff.data());

while (NLMSG_OK(nlmsg_hdr, len)) {
while (NLMSG_OK(nlmsg_hdr, len) && listen) {
if (nlmsg_hdr->nlmsg_type == NLMSG_NOOP) {
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion src/netlink_c.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <unistd.h>

/*
It was necessary to eparate the code using "<linux/cn_proc.h>" because one of its line can only be compiled in a
It was necessary to separate the code using "<linux/cn_proc.h>" because one of its line can only be compiled in a
C compiler...
*/

Expand Down

0 comments on commit 880e9b8

Please sign in to comment.