summaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_ipv4.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@mandriva.com>2006-03-21 07:01:03 +0100
committerDavid S. Miller <davem@davemloft.net>2006-03-21 07:01:03 +0100
commitc4d9390941aee136fd35bb38eb1d6de4e3b1487d (patch)
treefcaf0032ba5971145b5f527b8635cd7aa3a39d8c /net/ipv4/tcp_ipv4.c
parent[DCCP] ipv6: Add missing ipv6 control socket (diff)
downloadlinux-c4d9390941aee136fd35bb38eb1d6de4e3b1487d.tar.xz
linux-c4d9390941aee136fd35bb38eb1d6de4e3b1487d.zip
[ICSK]: Introduce inet_csk_ctl_sock_create
Consolidating open coded sequences in tcp and dccp, v4 and v6. Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r--net/ipv4/tcp_ipv4.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 57e7a26e8213..4eb903db1b12 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -1828,21 +1828,10 @@ struct proto tcp_prot = {
.rsk_prot = &tcp_request_sock_ops,
};
-
-
void __init tcp_v4_init(struct net_proto_family *ops)
{
- int err = sock_create_kern(PF_INET, SOCK_RAW, IPPROTO_TCP, &tcp_socket);
- if (err < 0)
+ if (inet_csk_ctl_sock_create(&tcp_socket, PF_INET, SOCK_RAW, IPPROTO_TCP) < 0)
panic("Failed to create the TCP control socket.\n");
- tcp_socket->sk->sk_allocation = GFP_ATOMIC;
- inet_sk(tcp_socket->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.
- */
- tcp_socket->sk->sk_prot->unhash(tcp_socket->sk);
}
EXPORT_SYMBOL(ipv4_specific);