diff options
author | Denis V. Lunev <den@openvz.org> | 2008-04-03 17:27:26 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-03 17:27:26 -0400 |
commit | 8258175c811440e93baa15ab1962a5905686dda3 (patch) | |
tree | 76128e47bec5c30fd67c551e4625df05d447c470 /net/sctp | |
parent | 4ffe0225e0628a5812168570b50d828f541c6b06 (diff) |
[SCTP]: Replace socket with sock for SCTP control socket.
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/sctp')
-rw-r--r-- | net/sctp/protocol.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index 6a3be58f606..ac0833c1945 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c | |||
@@ -74,7 +74,7 @@ DEFINE_SPINLOCK(sctp_assocs_id_lock); | |||
74 | * the Out-of-the-blue (OOTB) packets. A control sock will be created | 74 | * the Out-of-the-blue (OOTB) packets. A control sock will be created |
75 | * for this socket at the initialization time. | 75 | * for this socket at the initialization time. |
76 | */ | 76 | */ |
77 | static struct socket *sctp_ctl_socket; | 77 | static struct sock *sctp_ctl_sock; |
78 | 78 | ||
79 | static struct sctp_pf *sctp_pf_inet6_specific; | 79 | static struct sctp_pf *sctp_pf_inet6_specific; |
80 | static struct sctp_pf *sctp_pf_inet_specific; | 80 | static struct sctp_pf *sctp_pf_inet_specific; |
@@ -91,7 +91,7 @@ int sysctl_sctp_wmem[3]; | |||
91 | /* Return the address of the control sock. */ | 91 | /* Return the address of the control sock. */ |
92 | struct sock *sctp_get_ctl_sock(void) | 92 | struct sock *sctp_get_ctl_sock(void) |
93 | { | 93 | { |
94 | return sctp_ctl_socket->sk; | 94 | return sctp_ctl_sock; |
95 | } | 95 | } |
96 | 96 | ||
97 | /* Set up the proc fs entry for the SCTP protocol. */ | 97 | /* Set up the proc fs entry for the SCTP protocol. */ |
@@ -674,19 +674,21 @@ static int sctp_ctl_sock_init(void) | |||
674 | { | 674 | { |
675 | int err; | 675 | int err; |
676 | sa_family_t family; | 676 | sa_family_t family; |
677 | struct socket *socket; | ||
677 | 678 | ||
678 | if (sctp_get_pf_specific(PF_INET6)) | 679 | if (sctp_get_pf_specific(PF_INET6)) |
679 | family = PF_INET6; | 680 | family = PF_INET6; |
680 | else | 681 | else |
681 | family = PF_INET; | 682 | family = PF_INET; |
682 | 683 | ||
683 | err = inet_ctl_sock_create(&sctp_ctl_socket, family, | 684 | err = inet_ctl_sock_create(&socket, family, |
684 | SOCK_SEQPACKET, IPPROTO_SCTP); | 685 | SOCK_SEQPACKET, IPPROTO_SCTP); |
685 | if (err < 0) { | 686 | if (err < 0) { |
686 | printk(KERN_ERR | 687 | printk(KERN_ERR |
687 | "SCTP: Failed to create the SCTP control socket.\n"); | 688 | "SCTP: Failed to create the SCTP control socket.\n"); |
688 | return err; | 689 | return err; |
689 | } | 690 | } |
691 | sctp_ctl_sock = socket->sk; | ||
690 | return 0; | 692 | return 0; |
691 | } | 693 | } |
692 | 694 | ||
@@ -1284,7 +1286,7 @@ err_v6_add_protocol: | |||
1284 | sctp_v6_del_protocol(); | 1286 | sctp_v6_del_protocol(); |
1285 | err_add_protocol: | 1287 | err_add_protocol: |
1286 | sctp_v4_del_protocol(); | 1288 | sctp_v4_del_protocol(); |
1287 | sock_release(sctp_ctl_socket); | 1289 | sock_release(sctp_ctl_sock->sk_socket); |
1288 | err_ctl_sock_init: | 1290 | err_ctl_sock_init: |
1289 | sctp_v6_protosw_exit(); | 1291 | sctp_v6_protosw_exit(); |
1290 | err_v6_protosw_init: | 1292 | err_v6_protosw_init: |
@@ -1328,7 +1330,7 @@ SCTP_STATIC __exit void sctp_exit(void) | |||
1328 | sctp_v4_del_protocol(); | 1330 | sctp_v4_del_protocol(); |
1329 | 1331 | ||
1330 | /* Free the control endpoint. */ | 1332 | /* Free the control endpoint. */ |
1331 | sock_release(sctp_ctl_socket); | 1333 | sock_release(sctp_ctl_sock->sk_socket); |
1332 | 1334 | ||
1333 | /* Free protosw registrations */ | 1335 | /* Free protosw registrations */ |
1334 | sctp_v6_protosw_exit(); | 1336 | sctp_v6_protosw_exit(); |