summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorIlya Maximets <i.maximets@ovn.org>2026-08-25 17:27:24 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2026-09-07 18:48:56 +0200
commit7a099b347fef536a84068076e2d384f044e5cfc5 (patch)
treeb2b0cf330bf1524804499ea0a2eb49373ad16981 /include/linux
parentda4afc5a956d407443988e97a4d4ca14c2e999c7 (diff)
netfilter: report NLM_F_DUMP_FILTERED when all is filtered out
NLM_F_DUMP_FILTERED is only set on data elements in the conntrack dump. But when everything is filtered out it is confusing for the user space, since the flag is not reported anymore and it looks like the table was empty, which may or may not be the case. 'answer_flags' were introduced precisely for this use case, and the conntrack dump should set the flag in there in case the filtering was applied. This is important, for example, to be able to tell if the filters are supported or not by the kernel without modifying the kernel state. With the proper reporting of NLM_F_DUMP_FILTERED on NLMSG_DONE, an application in user space can just try and dump with an arbitrary filter without worrying that there could be no matching entry. The reported flag will signal that the filtering was applied and therefore supported. Fixes: cb8aa9a3affb ("netfilter: ctnetlink: add kernel side filtering for dump") Cc: stable@vger.kernel.org Signed-off-by: Ilya Maximets <i.maximets@ovn.org> Reviewed-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions