summaryrefslogtreecommitdiffstats
path: root/include/internal
diff options
context:
space:
mode:
authorRomain Bellan <romain.bellan@wifirst.fr>2020-01-29 10:47:18 +0100
committerFlorian Westphal <fw@strlen.de>2023-09-14 13:15:44 +0200
commitc2136262802f31cb19267dacf0c0fdecdea4ae16 (patch)
treed1eb985ab53162c084177c9d8199d620b2160a59 /include/internal
parent246dc83f653fbeddc4972391b6a542ffe24ce6a8 (diff)
Adding NFCT_FILTER_DUMP_TUPLE in filter_dump_attr, using kernel CTA_FILTER API
Following kernel side new conntrack filtering API, this patch implements userspace part. This patch: * Update headers to get new flag value from kernel * Use a conntrack struct to configure filtering * Set netlink flags according to values set in conntrack struct Signed-off-by: Romain Bellan <romain.bellan@wifirst.fr> Signed-off-by: Florent Fourcot <florent.fourcot@wifirst.fr> Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'include/internal')
-rw-r--r--include/internal/object.h1
-rw-r--r--include/internal/prototypes.h2
2 files changed, 2 insertions, 1 deletions
diff --git a/include/internal/object.h b/include/internal/object.h
index b919f57..4cac4f1 100644
--- a/include/internal/object.h
+++ b/include/internal/object.h
@@ -288,6 +288,7 @@ struct nfct_filter {
*/
struct nfct_filter_dump {
+ struct nf_conntrack ct;
struct nfct_filter_dump_mark mark;
struct nfct_filter_dump_mark status;
uint8_t l3num;
diff --git a/include/internal/prototypes.h b/include/internal/prototypes.h
index c0047b3..5e935f0 100644
--- a/include/internal/prototypes.h
+++ b/include/internal/prototypes.h
@@ -35,7 +35,7 @@ void __copy_fast(struct nf_conntrack *ct1, const struct nf_conntrack *ct);
int __setup_netlink_socket_filter(int fd, struct nfct_filter *filter);
-void __build_filter_dump(struct nfnlhdr *req, size_t size, const struct nfct_filter_dump *filter_dump);
+int __build_filter_dump(struct nfnlhdr *req, size_t size, const struct nfct_filter_dump *filter_dump);
int nfct_build_tuple(struct nlmsghdr *nlh, const struct __nfct_tuple *t, int type);
int nfct_parse_tuple(const struct nlattr *attr, struct __nfct_tuple *tuple, int dir, uint32_t *set);