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 c3ff334 commit 2b62f2c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/netlink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,11 @@ void Netlink::handle_events() {

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

while (NLMSG_OK(nlmsg_hdr, len) && listen) {
while (NLMSG_OK(nlmsg_hdr, len)) {
if (!std::filesystem::is_regular_file(input_file)) {
return;
}

if ((nlmsg_hdr->nlmsg_type == NLMSG_ERROR) || (nlmsg_hdr->nlmsg_type == NLMSG_NOOP)) {
continue;
}
Expand Down

0 comments on commit 2b62f2c

Please sign in to comment.