diff options
Diffstat (limited to 'net/dccp/ipv4.c')
-rw-r--r-- | net/dccp/ipv4.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c index 7d62f7eb613..f97049bf22c 100644 --- a/net/dccp/ipv4.c +++ b/net/dccp/ipv4.c @@ -36,7 +36,7 @@ * the Out-of-the-blue (OOTB) packets. A control sock will be created * for this socket at the initialization time. */ -static struct socket *dccp_v4_ctl_socket; +static struct sock *dccp_v4_ctl_sk; int dccp_v4_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) { @@ -514,11 +514,11 @@ static void dccp_v4_ctl_send_reset(struct sock *sk, struct sk_buff *rxskb) if (rxskb->rtable->rt_type != RTN_LOCAL) return; - dst = dccp_v4_route_skb(dccp_v4_ctl_socket->sk, rxskb); + dst = dccp_v4_route_skb(dccp_v4_ctl_sk, rxskb); if (dst == NULL) return; - skb = dccp_ctl_make_reset(dccp_v4_ctl_socket, rxskb); + skb = dccp_ctl_make_reset(dccp_v4_ctl_sk, rxskb); if (skb == NULL) goto out; @@ -527,10 +527,10 @@ static void dccp_v4_ctl_send_reset(struct sock *sk, struct sk_buff *rxskb) rxiph->daddr); skb->dst = dst_clone(dst); - bh_lock_sock(dccp_v4_ctl_socket->sk); - err = ip_build_and_send_pkt(skb, dccp_v4_ctl_socket->sk, + bh_lock_sock(dccp_v4_ctl_sk); + err = ip_build_and_send_pkt(skb, dccp_v4_ctl_sk, rxiph->daddr, rxiph->saddr, NULL); - bh_unlock_sock(dccp_v4_ctl_socket->sk); + bh_unlock_sock(dccp_v4_ctl_sk); if (net_xmit_eval(err) == 0) { DCCP_INC_STATS_BH(DCCP_MIB_OUTSEGS); @@ -991,6 +991,7 @@ static struct inet_protosw dccp_v4_protosw = { static int __init dccp_v4_init(void) { + struct socket *socket; int err = proto_register(&dccp_v4_prot, 1); if (err != 0) @@ -1002,10 +1003,11 @@ static int __init dccp_v4_init(void) inet_register_protosw(&dccp_v4_protosw); - err = inet_csk_ctl_sock_create(&dccp_v4_ctl_socket, PF_INET, + err = inet_csk_ctl_sock_create(&socket, PF_INET, SOCK_DCCP, IPPROTO_DCCP); if (err) goto out_unregister_protosw; + dccp_v4_ctl_sk = socket->sk; out: return err; out_unregister_protosw: |