diff options
author | David S. Miller <davem@davemloft.net> | 2016-07-12 10:21:27 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-07-12 10:21:27 -0700 |
commit | 92a03eb01277d710a97bcc07602aea083ba3fffd (patch) | |
tree | ce9a0aa810578d93e403a759baec7573dd36ba17 /include/net | |
parent | ce9a4f316d1240158063c54ddea1628926cb4553 (diff) | |
parent | 590b52e10d410e1439ae86be9fe19d75fdab628b (diff) | |
download | linux-92a03eb01277d710a97bcc07602aea083ba3fffd.tar.gz linux-92a03eb01277d710a97bcc07602aea083ba3fffd.tar.bz2 linux-92a03eb01277d710a97bcc07602aea083ba3fffd.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf
Pablo Neira Ayuso says:
====================
Netfilter/IPVS fixes for net
The following patchset contains Netfilter/IPVS fixes for your net tree.
they are:
1) Fix leak in the error path of nft_expr_init(), from Liping Zhang.
2) Tracing from nf_tables cannot be disabled, also from Zhang.
3) Fix an integer overflow on 32bit archs when setting the number of
hashtable buckets, from Florian Westphal.
4) Fix configuration of ipvs sync in backup mode with IPv6 address,
from Quentin Armitage via Simon Horman.
5) Fix incorrect timeout calculation in nft_ct NFT_CT_EXPIRATION,
from Florian Westphal.
6) Skip clash resolution in conntrack insertion races if NAT is in
place.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/netfilter/nf_conntrack.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h index dd78bea227c8..b6083c34ef0d 100644 --- a/include/net/netfilter/nf_conntrack.h +++ b/include/net/netfilter/nf_conntrack.h @@ -284,6 +284,14 @@ static inline bool nf_is_loopback_packet(const struct sk_buff *skb) return skb->dev && skb->skb_iif && skb->dev->flags & IFF_LOOPBACK; } +/* jiffies until ct expires, 0 if already expired */ +static inline unsigned long nf_ct_expires(const struct nf_conn *ct) +{ + long timeout = (long)ct->timeout.expires - (long)jiffies; + + return timeout > 0 ? timeout : 0; +} + struct kernel_param; int nf_conntrack_set_hashsize(const char *val, struct kernel_param *kp); |