[PATCH] netlink: Automatically request ACKs when a callback function is given
by Patrik Flykt
Supplying a callback function without setting NLM_F_ACK results in no
ACKs to be sent by the kernel and thus the callback will never be called.
---
ell/netlink.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/ell/netlink.c b/ell/netlink.c
index f2d1baf..d247173 100644
--- a/ell/netlink.c
+++ b/ell/netlink.c
@@ -399,6 +399,9 @@ LIB_EXPORT unsigned int l_netlink_send(struct l_netlink *netlink,
if (flags & 0xff)
return 0;
+ if (function)
+ flags |= NLM_F_ACK;
+
size = NLMSG_ALIGN(sizeof(struct command)) +
NLMSG_HDRLEN + NLMSG_ALIGN(len);
--
1.9.1
7 years, 10 months