]> err.no Git - linux-2.6/blobdiff - net/ipv4/ipvs/ip_vs_proto_tcp.c
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
[linux-2.6] / net / ipv4 / ipvs / ip_vs_proto_tcp.c
index 0e878fd6215c16cd6b422c4e001d4dfefa7d0606..820e8318d10df06be7412054814838b41e6ad17d 100644 (file)
@@ -151,7 +151,7 @@ tcp_snat_handler(struct sk_buff **pskb,
                /* Only port and addr are changed, do fast csum update */
                tcp_fast_csum_update(tcph, cp->daddr, cp->vaddr,
                                     cp->dport, cp->vport);
-               if ((*pskb)->ip_summed == CHECKSUM_HW)
+               if ((*pskb)->ip_summed == CHECKSUM_COMPLETE)
                        (*pskb)->ip_summed = CHECKSUM_NONE;
        } else {
                /* full checksum calculation */
@@ -204,7 +204,7 @@ tcp_dnat_handler(struct sk_buff **pskb,
                /* Only port and addr are changed, do fast csum update */
                tcp_fast_csum_update(tcph, cp->vaddr, cp->daddr,
                                     cp->vport, cp->dport);
-               if ((*pskb)->ip_summed == CHECKSUM_HW)
+               if ((*pskb)->ip_summed == CHECKSUM_COMPLETE)
                        (*pskb)->ip_summed = CHECKSUM_NONE;
        } else {
                /* full checksum calculation */
@@ -229,7 +229,7 @@ tcp_csum_check(struct sk_buff *skb, struct ip_vs_protocol *pp)
        switch (skb->ip_summed) {
        case CHECKSUM_NONE:
                skb->csum = skb_checksum(skb, tcphoff, skb->len - tcphoff, 0);
-       case CHECKSUM_HW:
+       case CHECKSUM_COMPLETE:
                if (csum_tcpudp_magic(skb->nh.iph->saddr, skb->nh.iph->daddr,
                                      skb->len - tcphoff,
                                      skb->nh.iph->protocol, skb->csum)) {
@@ -239,7 +239,7 @@ tcp_csum_check(struct sk_buff *skb, struct ip_vs_protocol *pp)
                }
                break;
        default:
-               /* CHECKSUM_UNNECESSARY */
+               /* No need to checksum. */
                break;
        }
 
@@ -275,28 +275,6 @@ static int tcp_timeouts[IP_VS_TCP_S_LAST+1] = {
        [IP_VS_TCP_S_LAST]              =       2*HZ,
 };
 
-
-#if 0
-
-/* FIXME: This is going to die */
-
-static int tcp_timeouts_dos[IP_VS_TCP_S_LAST+1] = {
-       [IP_VS_TCP_S_NONE]              =       2*HZ,
-       [IP_VS_TCP_S_ESTABLISHED]       =       8*60*HZ,
-       [IP_VS_TCP_S_SYN_SENT]          =       60*HZ,
-       [IP_VS_TCP_S_SYN_RECV]          =       10*HZ,
-       [IP_VS_TCP_S_FIN_WAIT]          =       60*HZ,
-       [IP_VS_TCP_S_TIME_WAIT]         =       60*HZ,
-       [IP_VS_TCP_S_CLOSE]             =       10*HZ,
-       [IP_VS_TCP_S_CLOSE_WAIT]        =       60*HZ,
-       [IP_VS_TCP_S_LAST_ACK]          =       30*HZ,
-       [IP_VS_TCP_S_LISTEN]            =       2*60*HZ,
-       [IP_VS_TCP_S_SYNACK]            =       100*HZ,
-       [IP_VS_TCP_S_LAST]              =       2*HZ,
-};
-
-#endif
-
 static char * tcp_state_name_table[IP_VS_TCP_S_LAST+1] = {
        [IP_VS_TCP_S_NONE]              =       "NONE",
        [IP_VS_TCP_S_ESTABLISHED]       =       "ESTABLISHED",
@@ -448,7 +426,7 @@ set_tcp_state(struct ip_vs_protocol *pp, struct ip_vs_conn *cp,
                struct ip_vs_dest *dest = cp->dest;
 
                IP_VS_DBG(8, "%s %s [%c%c%c%c] %u.%u.%u.%u:%d->"
-                         "%u.%u.%u.%u:%d state: %s->%s cnt:%d\n",
+                         "%u.%u.%u.%u:%d state: %s->%s conn->refcnt:%d\n",
                          pp->name,
                          (state_off==TCP_DIR_OUTPUT)?"output ":"input ",
                          th->syn? 'S' : '.',