lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.01.1101061508550.13211@obet.zrqbmnf.qr>
Date:	Thu, 6 Jan 2011 15:25:25 +0100 (CET)
From:	Jan Engelhardt <jengelh@...ozas.de>
To:	Pablo Neira Ayuso <pablo@...filter.org>
cc:	Netfilter Developer Mailing List 
	<netfilter-devel@...r.kernel.org>,
	Linux Networking Developer Mailing List 
	<netdev@...r.kernel.org>
Subject: Re: genetlink misinterprets NEW as GET

On Thursday 2011-01-06 14:48, Pablo Neira Ayuso wrote:
>> 
>> 	/* Modifiers to GET request */
>> 	#define NLM_F_ROOT      0x100
>> 	#define NLM_F_MATCH     0x200
>> 	#define NLM_F_ATOMIC    0x400
>> 	#define NLM_F_DUMP      (NLM_F_ROOT|NLM_F_MATCH)
>> 	
>> 	/* Modifiers to NEW request */
>> 	#define NLM_F_REPLACE   0x100
>> 	#define NLM_F_EXCL      0x200
>> 	#define NLM_F_CREATE    0x400
>> 	#define NLM_F_APPEND    0x800
>> 
>> Except there is nothing that declares a particular Netlink message
>> as "GET" or "NEW". Subsequently, genetlink chokes:
>> 
>> 	if (nlh->nlmsg_flags & NLM_F_DUMP)
>> 		if (ops->dumpit == NULL)
>> 			return -EOPNOTSUPP;
>> 
>> Because NLM_F_CREATE | NLM_F_EXCL == NLM_F_DUMP.
>> That, of course, is absolutely bogus.
>
>Hm, NLM_F_CREATE | NLM_F_EXCL is not equal to NLM_F_DUMP.
>
>You must be hitting -EOPNOTSUPP elsewhere.

No, I am hitting EOPNOTSUPP here; right it's not equal, sorry.
But nlmsg_flags is tested for NLM_F_MATCH (0x200), which is provided by
NLM_F_EXCL. ipset does use NLM_F_EXCL and thus ran into this.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ