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.vo...@gmail.com> Acked-by: Hans Dedecker <dedec...@gmail.com> --- system-linux.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/system-linux.c b/system-linux.c index db78240..e1b9924 100644 --- a/system-linux.c +++ b/system-linux.c @@ -456,8 +456,9 @@ static int cb_clear_event(struct nl_msg *msg, void *arg) 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; } -- 1.7.1 _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel