summaryrefslogtreecommitdiffstats
path: root/net/ipv6
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/ipv6
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/ipv6')
-rw-r--r--net/ipv6/tcp_ipv6.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 14de50380f4e..af6a0c60f903 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -1605,21 +1605,12 @@ static struct inet_protosw tcpv6_protosw = {
void __init tcpv6_init(void)
{
- int err;
-
/* register inet6 protocol */
if (inet6_add_protocol(&tcpv6_protocol, IPPROTO_TCP) < 0)
printk(KERN_ERR "tcpv6_init: Could not register protocol\n");
inet6_register_protosw(&tcpv6_protosw);
- err = sock_create_kern(PF_INET6, SOCK_RAW, IPPROTO_TCP, &tcp6_socket);
- if (err < 0)
+ if (inet_csk_ctl_sock_create(&tcp6_socket, PF_INET6, SOCK_RAW,
+ IPPROTO_TCP) < 0)
panic("Failed to create the TCPv6 control socket.\n");
- tcp6_socket->sk->sk_allocation = GFP_ATOMIC;
-
- /* Unhash it so that IP input processing does not even
- * see it, we do not wish this socket to see incoming
- * packets.
- */
- tcp6_socket->sk->sk_prot->unhash(tcp6_socket->sk);
}