Disable netlink auto ack when doing a delete in the get callback
handler to avoid race conditions resulting into stalled message
on the netlink socket.
Solves issue reported in https://dev.openwrt.org/ticket/14590
Signed-off-by: Karl Vogel <karl.vogel@gmail.com>
Acked-by: Hans Dedecker <dedeckeh@gmail.com>
hdr->nlmsg_type = type;
hdr->nlmsg_flags = NLM_F_REQUEST;
- if (!nl_send_auto_complete(sock_rtnl, clr->msg))
- nl_wait_for_ack(sock_rtnl);
+ nl_socket_disable_auto_ack(sock_rtnl);
+ nl_send_auto_complete(sock_rtnl, clr->msg);
+ nl_socket_enable_auto_ack(sock_rtnl);
return NL_SKIP;
}