aboutsummaryrefslogtreecommitdiff
path: root/net/dccp/ipv6.c
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2008-04-03 14:20:52 -0700
committerDavid S. Miller <davem@davemloft.net>2008-04-03 14:20:52 -0700
commit7630f026810a63464e47391ab1e03674c33eb1b8 (patch)
tree05ff3b2f6a750e659de4484c4b825953ecce1659 /net/dccp/ipv6.c
parent14c0c8e8e0fb85e7a57e88606c009377746b39d9 (diff)
[DCCP]: Replace socket with sock for reset sending.
Replace dccp_v(4|6)_ctl_socket with sock to unify a code with TCP/ICMP. Signed-off-by: Denis V. Lunev <den@openvz.org> Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp/ipv6.c')
-rw-r--r--net/dccp/ipv6.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c
index ea3f3264861..44e8b332317 100644
--- a/net/dccp/ipv6.c
+++ b/net/dccp/ipv6.c
@@ -34,7 +34,7 @@
#include "feat.h"
/* Socket used for sending RSTs and ACKs */
-static struct socket *dccp_v6_ctl_socket;
+static struct sock *dccp_v6_ctl_sk;
static struct inet_connection_sock_af_ops dccp_ipv6_mapped;
static struct inet_connection_sock_af_ops dccp_ipv6_af_ops;
@@ -303,7 +303,7 @@ static void dccp_v6_ctl_send_reset(struct sock *sk, struct sk_buff *rxskb)
if (!ipv6_unicast_destination(rxskb))
return;
- skb = dccp_ctl_make_reset(dccp_v6_ctl_socket, rxskb);
+ skb = dccp_ctl_make_reset(dccp_v6_ctl_sk, rxskb);
if (skb == NULL)
return;
@@ -324,7 +324,7 @@ static void dccp_v6_ctl_send_reset(struct sock *sk, struct sk_buff *rxskb)
/* sk = NULL, but it is safe for now. RST socket required. */
if (!ip6_dst_lookup(NULL, &skb->dst, &fl)) {
if (xfrm_lookup(&skb->dst, &fl, NULL, 0) >= 0) {
- ip6_xmit(dccp_v6_ctl_socket->sk, skb, &fl, NULL, 0);
+ ip6_xmit(dccp_v6_ctl_sk, skb, &fl, NULL, 0);
DCCP_INC_STATS_BH(DCCP_MIB_OUTSEGS);
DCCP_INC_STATS_BH(DCCP_MIB_OUTRSTS);
return;
@@ -1173,6 +1173,7 @@ static struct inet_protosw dccp_v6_protosw = {
static int __init dccp_v6_init(void)
{
+ struct socket *socket;
int err = proto_register(&dccp_v6_prot, 1);
if (err != 0)
@@ -1184,10 +1185,11 @@ static int __init dccp_v6_init(void)
inet6_register_protosw(&dccp_v6_protosw);
- err = inet_csk_ctl_sock_create(&dccp_v6_ctl_socket, PF_INET6,
+ err = inet_csk_ctl_sock_create(&socket, PF_INET6,
SOCK_DCCP, IPPROTO_DCCP);
if (err != 0)
goto out_unregister_protosw;
+ dccp_v6_ctl_sk = socket->sk;
out:
return err;
out_unregister_protosw: