Reason for NLE_MSGTYPE_NOSUPPORT

Yves Langisch yves at langisch.ch
Tue Nov 2 18:43:00 EDT 2010


Hi,

In my user space library I receive kernel events through generic netlink 
commands and attributes. Whenever my receiving thread gets a message I 
get a NLE_MSGTYPE_NOSUPPORT error. The only obvious difference to my 
other working messages is the complexity of the failing one.

...
         skb_rsp = genlmsg_new(NLMSG_GOODSIZE, GFP_KERNEL);
         if (skb_rsp == NULL)
                 return 0;

         msg_head = genlmsg_put(skb_rsp, dropstop_nl_pid,
			       atomic_inc_return(&dropstop_nl_seq),
			       &dropstop_genl_family, 0, DROPSTOP_C_VERDICT);
         if (msg_head == NULL)
                 goto send_event_failure;

	dropstop_dbg("verdict_id=0x%x", verdict_id);
	ret = nla_put_u32(skb_rsp, DROPSTOP_A_VERDICT_ID, verdict_id);
         if (ret != 0)
                 goto send_event_failure;
	dropstop_dbg("syscall=%d", syscall);
	ret = nla_put_u8(skb_rsp, DROPSTOP_A_SYSCALL, syscall);
         if (ret != 0)
                 goto send_event_failure;
	dropstop_dbg("protocol=%d", protocol);
	ret = nla_put_u8(skb_rsp, DROPSTOP_A_PROTOCOL, protocol);
         if (ret != 0)
                 goto send_event_failure;
	dropstop_dbg("family=%d", family);
	ret = nla_put_u8(skb_rsp, DROPSTOP_A_FAMILY, family);
         if (ret != 0)
                 goto send_event_failure;
	dropstop_dbg("uid=%d", me->cred->uid);
	ret = nla_put_u32(skb_rsp, DROPSTOP_A_UID, me->cred->uid);
         if (ret != 0)
                 goto send_event_failure;
	dropstop_dbg("pid=%d", me->pid);
	ret = nla_put_u32(skb_rsp, DROPSTOP_A_PID, me->pid);
         if (ret != 0)
                 goto send_event_failure;
	ret = nla_put(skb_rsp, DROPSTOP_A_DATA_EXT, len, data);
         if (ret != 0)
                 goto send_event_failure;

         ret = genlmsg_end(skb_rsp, msg_head);
         if (ret < 0)
                 goto send_event_failure;

         genlmsg_unicast(skb_rsp, dropstop_nl_pid);
...
Note the last attribute which is a binary attribute. What could be 
reason for this error message? Any ideas?

Thanks in advance!
Yves


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5198 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.infradead.org/pipermail/libnl/attachments/20101102/aed940a6/attachment.p7s>


More information about the libnl mailing list