Thread (12 messages) 12 messages, 4 authors, 2011-01-10

Re: genetlink misinterprets NEW as GET

flat view

From: Pablo Neira Ayuso <pablo@netfilter.org>
Date: 2011-01-07 01:31:25
Also in: netfilter-devel

On 06/01/11 18:23, Ben Pfaff wrote:
Pablo Neira Ayuso [off-list ref] writes:
quoted
On 04/01/11 03:14, Jan Engelhardt wrote:
quoted
	/* 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)
[...]
quoted
quoted
[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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help