Commit b31d4850 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Don't loop forever if there's no filter.

parent ff5e0e6f
......@@ -223,14 +223,10 @@ netlink_read(int (*filter)(struct nlmsghdr *, void *data), void *data)
return -1;
}
debugf("netlink_read: FILTER\n");
if(filter) {
err = filter(nh, data);
if(err || !(nh->nlmsg_flags & NLM_F_MULTI))
return err;
}
if(filter)
filter(nh, data);
if(!(nh->nlmsg_flags & NLM_F_MULTI))
break;
}
debugf("\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment