[INET]: Let inet_ctl_sock_create return sock rather than socket.
All upper protocol layers are already use sock internally. 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>
This commit is contained in:

committed by
David S. Miller

parent
8258175c81
commit
eee4fe4ded
@@ -674,21 +674,19 @@ static int sctp_ctl_sock_init(void)
|
||||
{
|
||||
int err;
|
||||
sa_family_t family;
|
||||
struct socket *socket;
|
||||
|
||||
if (sctp_get_pf_specific(PF_INET6))
|
||||
family = PF_INET6;
|
||||
else
|
||||
family = PF_INET;
|
||||
|
||||
err = inet_ctl_sock_create(&socket, family,
|
||||
err = inet_ctl_sock_create(&sctp_ctl_sock, family,
|
||||
SOCK_SEQPACKET, IPPROTO_SCTP);
|
||||
if (err < 0) {
|
||||
printk(KERN_ERR
|
||||
"SCTP: Failed to create the SCTP control socket.\n");
|
||||
return err;
|
||||
}
|
||||
sctp_ctl_sock = socket->sk;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user