]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - net/ipv4/inet_connection_sock.c
[NETFILTER]: remove arpt_table indirection macro
[mv-sheeva.git] / net / ipv4 / inet_connection_sock.c
index cc1a1859a61b69c3fab62b2044e015f23e2000ef..8d70cfbacb78470105bbc02590fc8120f7daaece 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) {
@@ -133,8 +133,6 @@ int inet_csk_get_port(struct sock *sk, unsigned short snum)
        goto tb_not_found;
 tb_found:
        if (!hlist_empty(&tb->owners)) {
-               if (sk->sk_reuse > 1)
-                       goto success;
                if (tb->fastreuse > 0 &&
                    sk->sk_reuse && sk->sk_state != TCP_LISTEN) {
                        goto success;
@@ -333,7 +331,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;
        }
@@ -651,25 +649,6 @@ void inet_csk_addr2sockaddr(struct sock *sk, struct sockaddr *uaddr)
 
 EXPORT_SYMBOL_GPL(inet_csk_addr2sockaddr);
 
-int inet_csk_ctl_sock_create(struct socket **sock, unsigned short family,
-                            unsigned short type, unsigned char protocol)
-{
-       int rc = sock_create_kern(family, type, protocol, sock);
-
-       if (rc == 0) {
-               (*sock)->sk->sk_allocation = GFP_ATOMIC;
-               inet_sk((*sock)->sk)->uc_ttl = -1;
-               /*
-                * Unhash it so that IP input processing does not even see it,
-                * we do not wish this socket to see incoming packets.
-                */
-               (*sock)->sk->sk_prot->unhash((*sock)->sk);
-       }
-       return rc;
-}
-
-EXPORT_SYMBOL_GPL(inet_csk_ctl_sock_create);
-
 #ifdef CONFIG_COMPAT
 int inet_csk_compat_getsockopt(struct sock *sk, int level, int optname,
                               char __user *optval, int __user *optlen)