From: Hans Dedecker Date: Tue, 11 Feb 2014 08:29:36 +0000 (+0000) Subject: netifd : Disable netlink auto ack X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fnetifd.git;a=commitdiff_plain;h=1ed34c73c45ee55fd677e8bb2a14e1fb83da26b4 netifd : Disable netlink auto ack 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 Acked-by: Hans Dedecker --- 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; }