From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pablo Neira Ayuso Subject: Re: genetlink misinterprets NEW as GET Date: Fri, 07 Jan 2011 02:31:17 +0100 Message-ID: <4D266CE5.4000309@netfilter.org> References: <4D25C82F.4010306@netfilter.org> <878vyyvtci.fsf@benpfaff.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Jan Engelhardt , Netfilter Developer Mailing List , Linux Networking Developer Mailing List To: Ben Pfaff Return-path: In-Reply-To: <878vyyvtci.fsf@benpfaff.org> Sender: netdev-owner@vger.kernel.org List-Id: netfilter-devel.vger.kernel.org On 06/01/11 18:23, Ben Pfaff wrote: > Pablo Neira Ayuso writes: > >> On 04/01/11 03:14, Jan Engelhardt 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) > [...] >>> [N.B.: I am also wondering whether >>> (nlh->nlmsg_flags & NLM_F_DUMP) == NLM_F_DUMP >>> may have been desired, because NLM_F_DUMP is composed of two bits.] >> >> Someone may include NLM_F_ATOMIC to a dump operation, in that case the >> checking that you propose is not valid. > > Are you saying that NLM_F_MATCH and NLM_F_ATOMIC are mutually > exclusive, and that NLM_F_ROOT|NLM_F_ATOMIC would also signal a > dump operation? Otherwise the test that Jan proposes looks valid > to me. Indeed, Jan's test is fine to fix this. Please, send a patch to Davem asap.