Skip to contentSkip to conversation

netlink: Automatically request ACKs when a callback function is given

PATCH In review Patrik Flykt 2 participants 2 messages Aug 27, 2014 – Aug 28, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 netlink: Automatically request ACKs when a callback function is given

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(+)
ell/netlink.c +3 -0
index f2d1baf..d247173 100644
@@ -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);
 
Signature · 1 line
1.9.1
#1 lore raw

Hi Patrik,

Quoted 5 lines

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(+)

patch has been applied.

Regards

Marcel