Skip to contentSkip to conversation

genl: Do not call the callback for NLMSG_DONE messages

PATCH In review Patrik Flykt 2 participants 2 messages Nov 12, 2014 – Nov 15, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 genl: Do not call the callback for NLMSG_DONE messages

The message indicates end of a multipart netlink message and does not carry any data.

---
 ell/genl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
ell/genl.c +1 -1
index 67bde5b..b180712 100644
@@ -373,7 +373,7 @@ static void process_request(struct l_genl *genl, const struct nlmsghdr *nlmsg)
 		return;
 	}
 
-	if (request->callback)
+	if (request->callback && nlmsg->nlmsg_type != NLMSG_DONE)
 		request->callback(msg, request->user_data);
 
 	if (nlmsg->nlmsg_flags & NLM_F_MULTI) {
Signature · 1 line
2.1.1
#1 lore raw

Hi Patrik,

Quoted 6 lines · Patrik Flykt

The message indicates end of a multipart netlink message and does not carry any data.

---
  ell/genl.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Patch has been applied, thanks.

Regards,
-Denis