summaryrefslogtreecommitdiff
path: root/system-linux.c
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2014-02-11 08:29:36 +0000
committerSteven Barth <steven@midlink.org>2014-02-14 20:56:21 +0100
commit1ed34c73c45ee55fd677e8bb2a14e1fb83da26b4 (patch)
tree81a3173f48290de23e7fc6f4781f586ebb015a62 /system-linux.c
parent88b3e92933925c09cfb6e95e9c8645727654ddf7 (diff)
downloadnetifd-1ed34c73c45ee55fd677e8bb2a14e1fb83da26b4.tar.gz
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 <karl.vogel@gmail.com> Acked-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'system-linux.c')
-rw-r--r--system-linux.c5
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;
}