diff options
author | Julian Anastasov <ja@ssi.bg> | 2012-04-24 23:46:36 +0300 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-05-08 19:38:26 +0200 |
commit | 06611f82cc0d8b957d6399f11f2799683ad002c3 (patch) | |
tree | ebefc1e883130f6470d9338d774ad5aebe6bf5fb | |
parent | 82cfc062781f29164b151de851f3076b84175fec (diff) | |
download | blackbird-op-linux-06611f82cc0d8b957d6399f11f2799683ad002c3.tar.gz blackbird-op-linux-06611f82cc0d8b957d6399f11f2799683ad002c3.zip |
ipvs: remove check for IP_VS_CONN_F_SYNC from ip_vs_bind_dest
As the IP_VS_CONN_F_INACTIVE bit is properly set
in cp->flags for all kind of connections we do not need to
add special checks for synced connections when updating
the activeconns/inactconns counters for first time. Now
logic will look just like in ip_vs_unbind_dest.
Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r-- | net/netfilter/ipvs/ip_vs_conn.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/netfilter/ipvs/ip_vs_conn.c b/net/netfilter/ipvs/ip_vs_conn.c index f562e630d35a..1c1bb309a955 100644 --- a/net/netfilter/ipvs/ip_vs_conn.c +++ b/net/netfilter/ipvs/ip_vs_conn.c @@ -585,11 +585,11 @@ ip_vs_bind_dest(struct ip_vs_conn *cp, struct ip_vs_dest *dest) /* Update the connection counters */ if (!(cp->flags & IP_VS_CONN_F_TEMPLATE)) { - /* It is a normal connection, so increase the inactive - connection counter because it is in TCP SYNRECV - state (inactive) or other protocol inacive state */ - if ((cp->flags & IP_VS_CONN_F_SYNC) && - (!(cp->flags & IP_VS_CONN_F_INACTIVE))) + /* It is a normal connection, so modify the counters + * according to the flags, later the protocol can + * update them on state change + */ + if (!(cp->flags & IP_VS_CONN_F_INACTIVE)) atomic_inc(&dest->activeconns); else atomic_inc(&dest->inactconns); |