aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netfilter/ipset/ip_set_timeout.h
diff options
context:
space:
mode:
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2011-06-16 18:42:40 +0200
committerPatrick McHardy <kaber@trash.net>2011-06-16 18:42:40 +0200
commitac8cc925d35fc5a05da2bd097e602f20de2478a4 (patch)
treef91b62fd166ff18386c4c9b38c02e46d9bc06b90 /include/linux/netfilter/ipset/ip_set_timeout.h
parentnetfilter: ipset: whitespace fixes: some space before tab slipped in (diff)
downloadlinux-dev-ac8cc925d35fc5a05da2bd097e602f20de2478a4.tar.xz
linux-dev-ac8cc925d35fc5a05da2bd097e602f20de2478a4.zip
netfilter: ipset: options and flags support added to the kernel API
The support makes possible to specify the timeout value for the SET target and a flag to reset the timeout for already existing entries. Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'include/linux/netfilter/ipset/ip_set_timeout.h')
-rw-r--r--include/linux/netfilter/ipset/ip_set_timeout.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/netfilter/ipset/ip_set_timeout.h b/include/linux/netfilter/ipset/ip_set_timeout.h
index bcdd40ad39ed..bae086af0e44 100644
--- a/include/linux/netfilter/ipset/ip_set_timeout.h
+++ b/include/linux/netfilter/ipset/ip_set_timeout.h
@@ -22,6 +22,9 @@
#define with_timeout(timeout) ((timeout) != IPSET_NO_TIMEOUT)
+#define opt_timeout(opt, map) \
+ (with_timeout((opt)->timeout) ? (opt)->timeout : (map)->timeout)
+
static inline unsigned int
ip_set_timeout_uget(struct nlattr *tb)
{