diff options
author | David S. Miller <davem@davemloft.net> | 2010-07-02 22:42:06 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-07-02 22:42:06 -0700 |
commit | e490c1defec4236a6a131fe2d13bf7ba787c02f8 (patch) | |
tree | 132325ca88cc86a74345a93b2774c5ca284b038a /net/netfilter/ipvs/ip_vs_conn.c | |
parent | 0a17d8c744e44617a3c22e7af68b4c5c9c1c5dba (diff) | |
parent | 4df53d8bab65cf2c18daebd51a5a4847e03f1943 (diff) | |
download | op-kernel-dev-e490c1defec4236a6a131fe2d13bf7ba787c02f8.zip op-kernel-dev-e490c1defec4236a6a131fe2d13bf7ba787c02f8.tar.gz |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6
Diffstat (limited to 'net/netfilter/ipvs/ip_vs_conn.c')
-rw-r--r-- | net/netfilter/ipvs/ip_vs_conn.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/net/netfilter/ipvs/ip_vs_conn.c b/net/netfilter/ipvs/ip_vs_conn.c index ff04e9e..654544e 100644 --- a/net/netfilter/ipvs/ip_vs_conn.c +++ b/net/netfilter/ipvs/ip_vs_conn.c @@ -158,6 +158,9 @@ static inline int ip_vs_conn_hash(struct ip_vs_conn *cp) unsigned hash; int ret; + if (cp->flags & IP_VS_CONN_F_ONE_PACKET) + return 0; + /* Hash by protocol, client address and port */ hash = ip_vs_conn_hashkey(cp->af, cp->protocol, &cp->caddr, cp->cport); @@ -359,8 +362,9 @@ struct ip_vs_conn *ip_vs_conn_out_get */ void ip_vs_conn_put(struct ip_vs_conn *cp) { - /* reset it expire in its timeout */ - mod_timer(&cp->timer, jiffies+cp->timeout); + unsigned long t = (cp->flags & IP_VS_CONN_F_ONE_PACKET) ? + 0 : cp->timeout; + mod_timer(&cp->timer, jiffies+t); __ip_vs_conn_put(cp); } @@ -653,7 +657,7 @@ static void ip_vs_conn_expire(unsigned long data) /* * unhash it if it is hashed in the conn table */ - if (!ip_vs_conn_unhash(cp)) + if (!ip_vs_conn_unhash(cp) && !(cp->flags & IP_VS_CONN_F_ONE_PACKET)) goto expire_later; /* |