From 1ed34c73c45ee55fd677e8bb2a14e1fb83da26b4 Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Tue, 11 Feb 2014 08:29:36 +0000 Subject: [PATCH] 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 --- system-linux.c | 5 +++-- 1 file 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; } -- 2.25.1