Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux...
[deliverable/linux.git] / net / ipv4 / tcp_minisocks.c
index f8d67ccc64f3254c1080008df83b234e3853d976..624c3c9b3c2bbe33a37f53b105d041b08ce490ef 100644 (file)
@@ -322,7 +322,7 @@ void tcp_time_wait(struct sock *sk, int state, int timeo)
                        if (key != NULL) {
                                memcpy(&tcptw->tw_md5_key, key->key, key->keylen);
                                tcptw->tw_md5_keylen = key->keylen;
-                               if (tcp_alloc_md5sig_pool() == NULL)
+                               if (tcp_alloc_md5sig_pool(sk) == NULL)
                                        BUG();
                        }
                } while (0);
@@ -363,7 +363,7 @@ void tcp_twsk_destructor(struct sock *sk)
 #ifdef CONFIG_TCP_MD5SIG
        struct tcp_timewait_sock *twsk = tcp_twsk(sk);
        if (twsk->tw_md5_keylen)
-               tcp_put_md5sig_pool();
+               tcp_free_md5sig_pool();
 #endif
 }
 
@@ -410,7 +410,7 @@ struct sock *tcp_create_openreq_child(struct sock *sk, struct request_sock *req,
                newtp->retrans_out = 0;
                newtp->sacked_out = 0;
                newtp->fackets_out = 0;
-               newtp->snd_ssthresh = 0x7fffffff;
+               newtp->snd_ssthresh = TCP_INFINITE_SSTHRESH;
 
                /* So many TCP implementations out there (incorrectly) count the
                 * initial SYN frame in their delayed-ACK and congestion control
@@ -657,29 +657,6 @@ struct sock *tcp_check_req(struct sock *sk, struct sk_buff *skb,
        child = inet_csk(sk)->icsk_af_ops->syn_recv_sock(sk, skb, req, NULL);
        if (child == NULL)
                goto listen_overflow;
-#ifdef CONFIG_TCP_MD5SIG
-       else {
-               /* Copy over the MD5 key from the original socket */
-               struct tcp_md5sig_key *key;
-               struct tcp_sock *tp = tcp_sk(sk);
-               key = tp->af_specific->md5_lookup(sk, child);
-               if (key != NULL) {
-                       /*
-                        * We're using one, so create a matching key on the
-                        * newsk structure. If we fail to get memory then we
-                        * end up not copying the key across. Shucks.
-                        */
-                       char *newkey = kmemdup(key->key, key->keylen,
-                                              GFP_ATOMIC);
-                       if (newkey) {
-                               if (!tcp_alloc_md5sig_pool())
-                                       BUG();
-                               tp->af_specific->md5_add(child, child, newkey,
-                                                        key->keylen);
-                       }
-               }
-       }
-#endif
 
        inet_csk_reqsk_queue_unlink(sk, req, prev);
        inet_csk_reqsk_queue_removed(sk, req);
This page took 0.025125 seconds and 5 git commands to generate.