aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/tcp_ipv6.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@mandriva.com>2006-03-21 01:01:03 -0500
committerDavid S. Miller <davem@davemloft.net>2006-03-21 01:01:03 -0500
commitc4d9390941aee136fd35bb38eb1d6de4e3b1487d (patch)
treefcaf0032ba5971145b5f527b8635cd7aa3a39d8c /net/ipv6/tcp_ipv6.c
parent72478873571d869906f7a250b09e12fa5b65e321 (diff)
[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/tcp_ipv6.c')
-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 = {
1605 1605
1606void __init tcpv6_init(void) 1606void __init tcpv6_init(void)
1607{ 1607{
1608 int err;
1609
1610 /* register inet6 protocol */ 1608 /* register inet6 protocol */
1611 if (inet6_add_protocol(&tcpv6_protocol, IPPROTO_TCP) < 0) 1609 if (inet6_add_protocol(&tcpv6_protocol, IPPROTO_TCP) < 0)
1612 printk(KERN_ERR "tcpv6_init: Could not register protocol\n"); 1610 printk(KERN_ERR "tcpv6_init: Could not register protocol\n");
1613 inet6_register_protosw(&tcpv6_protosw); 1611 inet6_register_protosw(&tcpv6_protosw);
1614 1612
1615 err = sock_create_kern(PF_INET6, SOCK_RAW, IPPROTO_TCP, &tcp6_socket); 1613 if (inet_csk_ctl_sock_create(&tcp6_socket, PF_INET6, SOCK_RAW,
1616 if (err < 0) 1614 IPPROTO_TCP) < 0)
1617 panic("Failed to create the TCPv6 control socket.\n"); 1615 panic("Failed to create the TCPv6 control socket.\n");
1618 tcp6_socket->sk->sk_allocation = GFP_ATOMIC;
1619
1620 /* Unhash it so that IP input processing does not even
1621 * see it, we do not wish this socket to see incoming
1622 * packets.
1623 */
1624 tcp6_socket->sk->sk_prot->unhash(tcp6_socket->sk);
1625} 1616}