]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv4/inet_connection_sock.c
[NETFILTER]: nf_conntrack_sip: parse SIP headers properly
[linux-2.6-omap-h63xx.git] / net / ipv4 / inet_connection_sock.c
index 8a45be98870908af051e2d0049c129d59361d9e8..a7fcaf20564409f40622e40bba63eed0b013e1fa 100644 (file)
@@ -80,12 +80,12 @@ EXPORT_SYMBOL_GPL(inet_csk_bind_conflict);
  */
 int inet_csk_get_port(struct sock *sk, unsigned short snum)
 {
-       struct inet_hashinfo *hashinfo = sk->sk_prot->hashinfo;
+       struct inet_hashinfo *hashinfo = sk->sk_prot->h.hashinfo;
        struct inet_bind_hashbucket *head;
        struct hlist_node *node;
        struct inet_bind_bucket *tb;
        int ret;
-       struct net *net = sk->sk_net;
+       struct net *net = sock_net(sk);
 
        local_bh_disable();
        if (!snum) {
@@ -333,7 +333,7 @@ struct dst_entry* inet_csk_route_req(struct sock *sk,
                                         .dport = ireq->rmt_port } } };
 
        security_req_classify_flow(req, &fl);
-       if (ip_route_output_flow(&init_net, &rt, &fl, sk, 0)) {
+       if (ip_route_output_flow(sock_net(sk), &rt, &fl, sk, 0)) {
                IP_INC_STATS_BH(IPSTATS_MIB_OUTNOROUTES);
                return NULL;
        }
@@ -414,8 +414,7 @@ void inet_csk_reqsk_queue_prune(struct sock *parent,
        struct inet_connection_sock *icsk = inet_csk(parent);
        struct request_sock_queue *queue = &icsk->icsk_accept_queue;
        struct listen_sock *lopt = queue->listen_opt;
-       int max_retries = icsk->icsk_syn_retries ? : sysctl_tcp_synack_retries;
-       int thresh = max_retries;
+       int thresh = icsk->icsk_syn_retries ? : sysctl_tcp_synack_retries;
        unsigned long now = jiffies;
        struct request_sock **reqp, *req;
        int i, budget;
@@ -451,9 +450,6 @@ void inet_csk_reqsk_queue_prune(struct sock *parent,
                }
        }
 
-       if (queue->rskq_defer_accept)
-               max_retries = queue->rskq_defer_accept;
-
        budget = 2 * (lopt->nr_table_entries / (timeout / interval));
        i = lopt->clock_hand;
 
@@ -461,9 +457,8 @@ void inet_csk_reqsk_queue_prune(struct sock *parent,
                reqp=&lopt->syn_table[i];
                while ((req = *reqp) != NULL) {
                        if (time_after_eq(now, req->expires)) {
-                               if ((req->retrans < (inet_rsk(req)->acked ? max_retries : thresh)) &&
-                                   (inet_rsk(req)->acked ||
-                                    !req->rsk_ops->rtx_syn_ack(parent, req))) {
+                               if (req->retrans < thresh &&
+                                   !req->rsk_ops->rtx_syn_ack(parent, req)) {
                                        unsigned long timeo;
 
                                        if (req->retrans++ == 0)