Lines Matching refs:newsk
655 struct sock *newsk; in sctp_v6_create_accept_sk() local
659 newsk = sk_alloc(sock_net(sk), PF_INET6, GFP_KERNEL, sk->sk_prot); in sctp_v6_create_accept_sk()
660 if (!newsk) in sctp_v6_create_accept_sk()
663 sock_init_data(NULL, newsk); in sctp_v6_create_accept_sk()
665 sctp_copy_sock(newsk, sk, asoc); in sctp_v6_create_accept_sk()
668 newsctp6sk = (struct sctp6_sock *)newsk; in sctp_v6_create_accept_sk()
669 inet_sk(newsk)->pinet6 = &newsctp6sk->inet6; in sctp_v6_create_accept_sk()
671 sctp_sk(newsk)->v4mapped = sctp_sk(sk)->v4mapped; in sctp_v6_create_accept_sk()
673 newnp = inet6_sk(newsk); in sctp_v6_create_accept_sk()
683 sctp_v6_to_sk_daddr(&asoc->peer.primary_addr, newsk); in sctp_v6_create_accept_sk()
685 sk_refcnt_debug_inc(newsk); in sctp_v6_create_accept_sk()
687 if (newsk->sk_prot->init(newsk)) { in sctp_v6_create_accept_sk()
688 sk_common_release(newsk); in sctp_v6_create_accept_sk()
689 newsk = NULL; in sctp_v6_create_accept_sk()
693 return newsk; in sctp_v6_create_accept_sk()