summaryrefslogtreecommitdiff
path: root/include/uapi/linux/netfilter
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2021-07-30 15:14:22 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2021-08-05 13:36:39 +0200
commit9344988d2979ce9eefe136a69efcf692615ebba8 (patch)
treeb99cd41bb9628a98b4993532d88eeaf1d8360ab2 /include/uapi/linux/netfilter
parentff1199db8c3b7cdc3ac4430badfd254023c5142e (diff)
netfilter: ctnetlink: allow to filter dump by status bits
If CTA_STATUS is present, but CTA_STATUS_MASK is not, then the mask is automatically set to 'status', so that kernel returns those entries that have all of the requested bits set. This makes more sense than using a all-one mask since we'd hardly ever find a match. There are no other checks for status bits, so if e.g. userspace sets impossible combinations it will get an empty dump. If kernel would reject unknown status bits, then a program that works on a future kernel that has IPS_FOO bit fails on old kernels. Same for 'impossible' combinations: Kernel never sets ASSURED without first having set SEEN_REPLY, but its possible that a future kernel could do so. Therefore no sanity tests other than a 0-mask. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/uapi/linux/netfilter')
-rw-r--r--include/uapi/linux/netfilter/nfnetlink_conntrack.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/uapi/linux/netfilter/nfnetlink_conntrack.h b/include/uapi/linux/netfilter/nfnetlink_conntrack.h
index d8484be72fdc..c6e6d7d7d538 100644
--- a/include/uapi/linux/netfilter/nfnetlink_conntrack.h
+++ b/include/uapi/linux/netfilter/nfnetlink_conntrack.h
@@ -56,6 +56,7 @@ enum ctattr_type {
CTA_LABELS_MASK,
CTA_SYNPROXY,
CTA_FILTER,
+ CTA_STATUS_MASK,
__CTA_MAX
};
#define CTA_MAX (__CTA_MAX - 1)