]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ipvs: inherit forwarding method in backup
authorJulian Anastasov <ja@ssi.bg>
Sun, 17 Oct 2010 13:43:36 +0000 (16:43 +0300)
committerSimon Horman <horms@verge.net.au>
Thu, 21 Oct 2010 09:04:30 +0000 (11:04 +0200)
  Connections in backup server should inherit the
forwarding method from real server. It is a way to fix a
problem where the forwarding method in backup connection
is damaged by logical OR operation with the real server's
connection flags. And the change is needed for setups
where the backup server uses different forwarding method
for the same real servers.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
net/netfilter/ipvs/ip_vs_conn.c

index 1d1a529dbe24d20e2da90878c08e60c987671b2e..e9adecdc8ca4779468c494c1a2418049ca2384eb 100644 (file)
@@ -563,6 +563,8 @@ ip_vs_bind_dest(struct ip_vs_conn *cp, struct ip_vs_dest *dest)
                 */
                if (!(cp->flags & IP_VS_CONN_F_TEMPLATE))
                        conn_flags &= ~IP_VS_CONN_F_INACTIVE;
+               /* connections inherit forwarding method from dest */
+               cp->flags &= ~IP_VS_CONN_F_FWD_MASK;
        }
        cp->flags |= conn_flags;
        cp->dest = dest;