mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[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:
parent
8258175c81
commit
eee4fe4ded
7 changed files with 14 additions and 21 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue