netlink: test for all flags of the NLM_F_DUMP composite
authorJan Engelhardt <jengelh@medozas.de>
Fri, 7 Jan 2011 03:15:05 +0000 (03:15 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 10 Jan 2011 00:25:03 +0000 (16:25 -0800)
Due to NLM_F_DUMP is composed of two bits, NLM_F_ROOT | NLM_F_MATCH,
when doing "if (x & NLM_F_DUMP)", it tests for _either_ of the bits
being set. Because NLM_F_MATCH's value overlaps with NLM_F_EXCL,
non-dump requests with NLM_F_EXCL set are mistaken as dump requests.

Substitute the condition to test for _all_ bits being set.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

No differences found