[PATCH v2 2/8] ipvs: remove check for IP_VS_CONN_F_SYNC from ip_vs_bind_

To: Simon Horman <horms@xxxxxxxxxxxx>
Subject: [PATCH v2 2/8] ipvs: remove check for IP_VS_CONN_F_SYNC from ip_vs_bind_dest
Cc: lvs-devel@xxxxxxxxxxxxxxx, Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>, Aleksey Chudov <aleksey.chudov@xxxxxxxxx>
From: Julian Anastasov <ja@xxxxxx>
Date: Fri, 20 Apr 2012 00:49:53 +0300
        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@xxxxxx>
 net/netfilter/ipvs/ip_vs_conn.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/net/netfilter/ipvs/ip_vs_conn.c b/net/netfilter/ipvs/ip_vs_conn.c
index 6413d58..18f58a08 100644
--- a/net/netfilter/ipvs/ip_vs_conn.c
+++ b/net/netfilter/ipvs/ip_vs_conn.c
@@ -585,11 +585,10 @@ ip_vs_bind_dest(struct ip_vs_conn *cp, struct ip_vs_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))

To unsubscribe from this list: send the line "unsubscribe lvs-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at

<Prev in Thread] Current Thread [Next in Thread>