Lines Matching refs:newsk
177 static void sctp_v4_copy_ip_options(struct sock *sk, struct sock *newsk) in sctp_v4_copy_ip_options() argument
182 newinet = inet_sk(newsk); in sctp_v4_copy_ip_options()
187 newopt = sock_kmalloc(newsk, sizeof(*inet_opt) + in sctp_v4_copy_ip_options()
579 struct sock *newsk = sk_alloc(sock_net(sk), PF_INET, GFP_KERNEL, in sctp_v4_create_accept_sk() local
583 if (!newsk) in sctp_v4_create_accept_sk()
586 sock_init_data(NULL, newsk); in sctp_v4_create_accept_sk()
588 sctp_copy_sock(newsk, sk, asoc); in sctp_v4_create_accept_sk()
589 sock_reset_flag(newsk, SOCK_ZAPPED); in sctp_v4_create_accept_sk()
591 sctp_v4_copy_ip_options(sk, newsk); in sctp_v4_create_accept_sk()
593 newinet = inet_sk(newsk); in sctp_v4_create_accept_sk()
597 sk_refcnt_debug_inc(newsk); in sctp_v4_create_accept_sk()
599 if (newsk->sk_prot->init(newsk)) { in sctp_v4_create_accept_sk()
600 sk_common_release(newsk); in sctp_v4_create_accept_sk()
601 newsk = NULL; in sctp_v4_create_accept_sk()
605 return newsk; in sctp_v4_create_accept_sk()