diff options
author | Florian Westphal <fw@strlen.de> | 2016-08-03 02:45:07 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-08-12 00:43:13 +0200 |
commit | d0b35b93d45cedf1dc561aba4027441b3d28d290 (patch) | |
tree | 6c5917ba3944ed563a86517e5503a371e23757a1 /net/netfilter/xt_conntrack.c | |
parent | 9f7c824a44c9f03a5ee9b6291b0685cbdb89ae58 (diff) | |
download | linux-d0b35b93d45cedf1dc561aba4027441b3d28d290.tar.gz linux-d0b35b93d45cedf1dc561aba4027441b3d28d290.tar.bz2 linux-d0b35b93d45cedf1dc561aba4027441b3d28d290.zip |
netfilter: use_nf_conn_expires helper in more places
... so we don't need to touch all of these places when we get rid of the
timer in nf_conn.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/xt_conntrack.c')
-rw-r--r-- | net/netfilter/xt_conntrack.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/netfilter/xt_conntrack.c b/net/netfilter/xt_conntrack.c index 188404b9b002..a3b8f697cfc5 100644 --- a/net/netfilter/xt_conntrack.c +++ b/net/netfilter/xt_conntrack.c @@ -233,10 +233,8 @@ conntrack_mt(const struct sk_buff *skb, struct xt_action_param *par, return false; if (info->match_flags & XT_CONNTRACK_EXPIRES) { - unsigned long expires = 0; + unsigned long expires = nf_ct_expires(ct) / HZ; - if (timer_pending(&ct->timeout)) - expires = (ct->timeout.expires - jiffies) / HZ; if ((expires >= info->expires_min && expires <= info->expires_max) ^ !(info->invert_flags & XT_CONNTRACK_EXPIRES)) |