about netlink message handle in netifd
lin jia
chinasjtu at msn.com
Thu Dec 12 18:00:14 PST 2024
hi all
In netifd, the netlink message handle "handler_nl_event" only deal with one message at one time ,
if (!u->error) {
nl_recvmsgs_default(ev->sock);
return;
}
which may cause netlink buffer overflow frequently, can we modify it to
if (!u->error) {
int counts = 0;
struct pollfd pfd = {
.fd = ev->uloop.fd,
.events = POLLIN,
};
while(poll(&pfd, 1, 0)>0){
nl_recvmsgs_default(ev->sock);
counts++;
}
netifd_log_message(L_NOTICE, "%s %d counts %d msg done\n", __func__, __LINE__, counts);
//nl_recvmsgs_default(ev->sock);
return;
}
to deal more netlink message as much as it can
More information about the openwrt-devel
mailing list