summaryrefslogtreecommitdiff
path: root/net/sctp/protocol.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sctp/protocol.c')
-rw-r--r--net/sctp/protocol.c33
1 files changed, 0 insertions, 33 deletions
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
index 9dbc24af749b..2c3398f75d76 100644
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -580,38 +580,6 @@ static int sctp_v4_is_ce(const struct sk_buff *skb)
return INET_ECN_is_ce(ip_hdr(skb)->tos);
}
-/* Create and initialize a new sk for the socket returned by accept(). */
-static struct sock *sctp_v4_create_accept_sk(struct sock *sk,
- struct sctp_association *asoc,
- bool kern)
-{
- struct sock *newsk = sk_alloc(sock_net(sk), PF_INET, GFP_KERNEL,
- sk->sk_prot, kern);
- struct inet_sock *newinet;
-
- if (!newsk)
- goto out;
-
- sock_init_data(NULL, newsk);
-
- sctp_copy_sock(newsk, sk, asoc);
- sock_reset_flag(newsk, SOCK_ZAPPED);
-
- sctp_v4_copy_ip_options(sk, newsk);
-
- newinet = inet_sk(newsk);
-
- newinet->inet_daddr = asoc->peer.primary_addr.v4.sin_addr.s_addr;
-
- if (newsk->sk_prot->init(newsk)) {
- sk_common_release(newsk);
- newsk = NULL;
- }
-
-out:
- return newsk;
-}
-
static int sctp_v4_addr_to_user(struct sctp_sock *sp, union sctp_addr *addr)
{
/* No address mapping for V4 sockets */
@@ -1119,7 +1087,6 @@ static struct sctp_pf sctp_pf_inet = {
.bind_verify = sctp_inet_bind_verify,
.send_verify = sctp_inet_send_verify,
.supported_addrs = sctp_inet_supported_addrs,
- .create_accept_sk = sctp_v4_create_accept_sk,
.addr_to_user = sctp_v4_addr_to_user,
.to_sk_saddr = sctp_v4_to_sk_saddr,
.to_sk_daddr = sctp_v4_to_sk_daddr,