Reason for NLE_MSGTYPE_NOSUPPORT

Yves Langisch yves at langisch.ch
Thu Nov 4 19:13:54 EDT 2010


This happens on the client side. After going through your source code it 
turned out that there was a sequence number mismatch which leads to a 
-22 (-EINVAL). After registering my own callback everything works fine. 
Thanks!

Yves

On 03.11.2010 12:14, Yves Langisch wrote:
> The server side registration is done as follows. On the client side
> (user space) I've set the env variable to NLDBG=5 but the debug output
> does not give me any hint what could be wrong. Let me know if you need
> more info. Thanks! Yves
>
> ...
> static struct genl_ops dropstop_genl_ops_verdict = {
> .cmd = DROPSTOP_C_VERDICT,
> .flags = 0, //todo eigentlich wär's GENL_ADMIN_PERM
> .policy = dropstop_genl_policy,
> .doit = dropstop_nl_verdict,
> .dumpit = NULL,
> };
>
> ...
>
> static const struct nla_policy dropstop_genl_policy[DROPSTOP_A_MAX + 1]
> __read_mostly = {
> [DROPSTOP_A_VERSION] = { .type = NLA_U32 },
> [DROPSTOP_A_SYSCALL] = { .type = NLA_U8 },
> [DROPSTOP_A_PROTOCOL] = { .type = NLA_U8 },
> [DROPSTOP_A_INSERTED] = { .type = NLA_FLAG },
> [DROPSTOP_A_REMOVED] = { .type = NLA_FLAG },
> [DROPSTOP_A_FLUSHED] = { .type = NLA_FLAG },
> [DROPSTOP_A_REGISTERED] = { .type = NLA_FLAG },
> [DROPSTOP_A_UNREGISTERED] = { .type = NLA_FLAG },
> [DROPSTOP_A_VERDICT_ID] = { .type = NLA_U32 },
> [DROPSTOP_A_FAMILY] = { .type = NLA_U8 },
> [DROPSTOP_A_UID] = { .type = NLA_U32 },
> [DROPSTOP_A_PID] = { .type = NLA_U32 },
> [DROPSTOP_A_TYPE] = { .type = NLA_U8 },
> [DROPSTOP_A_SADDR] = { .type = NLA_U32 },
> [DROPSTOP_A_SADDR6] = { .type = NLA_BINARY,
> .len = sizeof(struct in6_addr) },
> [DROPSTOP_A_DADDR] = { .type = NLA_U32 },
> [DROPSTOP_A_DADDR6] = { .type = NLA_BINARY,
> .len = sizeof(struct in6_addr) },
> [DROPSTOP_A_SPORT] = { .type = NLA_U16 },
> [DROPSTOP_A_DPORT] = { .type = NLA_U16 },
> [DROPSTOP_A_BUFFER_LEN] = { .len = sizeof(__kernel_size_t) },
> [DROPSTOP_A_BUFFER] = { .type = NLA_FLAG },
> [DROPSTOP_A_VERDICT] = { .type = NLA_U8 },
> [DROPSTOP_A_DATA_EXT] = { .type = NLA_BINARY,
> .len = sizeof(struct dropstop_sock_info) },
> [DROPSTOP_A_VERDICT_DELAY] = { .type = NLA_U32 },
> [DROPSTOP_A_VERDICT_DELAY_F] = { .type = NLA_FLAG },
> };
>
> ...
>
> static struct genl_family dropstop_genl_family = {
> .id = GENL_ID_GENERATE,
> .hdrsize = 0,
> .name = DROPSTOP_GENL_NAME,
> .version = DROPSTOP_GENL_VERSION,
> .maxattr = DROPSTOP_A_MAX,
> };
>
>
> On 03.11.2010 12:05, Thomas Graf wrote:
>> On Tue, Nov 02, 2010 at 11:43:00PM +0100, Yves Langisch wrote:
>>> 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.
>>>
>>> Note the last attribute which is a binary attribute. What could be
>>> reason for this error message? Any ideas?
>>
>> In the context of genetlink this means that while parsing, no
>> matching genetlink command was found.
>>
>> How did you register the verdict cmd? Could also be a parsing bug.
>>
>
>
>
> _______________________________________________
> libnl mailing list
> libnl at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/libnl

-------------- 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/20101105/63bb7369/attachment.p7s>


More information about the libnl mailing list