Lines Matching refs:newsk
3771 struct sock *newsk = NULL; in sctp_accept() local
3802 newsk = sp->pf->create_accept_sk(sk, asoc); in sctp_accept()
3803 if (!newsk) { in sctp_accept()
3811 sctp_sock_migrate(sk, newsk, asoc, SCTP_SOCKET_TCP); in sctp_accept()
3816 return newsk; in sctp_accept()
6854 void sctp_copy_sock(struct sock *newsk, struct sock *sk, in sctp_copy_sock() argument
6860 newsk->sk_type = sk->sk_type; in sctp_copy_sock()
6861 newsk->sk_bound_dev_if = sk->sk_bound_dev_if; in sctp_copy_sock()
6862 newsk->sk_flags = sk->sk_flags; in sctp_copy_sock()
6863 newsk->sk_no_check = sk->sk_no_check; in sctp_copy_sock()
6864 newsk->sk_reuse = sk->sk_reuse; in sctp_copy_sock()
6866 newsk->sk_shutdown = sk->sk_shutdown; in sctp_copy_sock()
6867 newsk->sk_destruct = inet_sock_destruct; in sctp_copy_sock()
6868 newsk->sk_family = sk->sk_family; in sctp_copy_sock()
6869 newsk->sk_protocol = IPPROTO_SCTP; in sctp_copy_sock()
6870 newsk->sk_backlog_rcv = sk->sk_prot->backlog_rcv; in sctp_copy_sock()
6871 newsk->sk_sndbuf = sk->sk_sndbuf; in sctp_copy_sock()
6872 newsk->sk_rcvbuf = sk->sk_rcvbuf; in sctp_copy_sock()
6873 newsk->sk_lingertime = sk->sk_lingertime; in sctp_copy_sock()
6874 newsk->sk_rcvtimeo = sk->sk_rcvtimeo; in sctp_copy_sock()
6875 newsk->sk_sndtimeo = sk->sk_sndtimeo; in sctp_copy_sock()
6877 newinet = inet_sk(newsk); in sctp_copy_sock()
6899 static void sctp_sock_migrate(struct sock *oldsk, struct sock *newsk, in sctp_sock_migrate() argument
6904 struct sctp_sock *newsp = sctp_sk(newsk); in sctp_sock_migrate()
6915 newsk->sk_sndbuf = oldsk->sk_sndbuf; in sctp_sock_migrate()
6916 newsk->sk_rcvbuf = oldsk->sk_rcvbuf; in sctp_sock_migrate()
6920 inet_sk_copy_descendant(newsk, oldsk); in sctp_sock_migrate()
6923 inet_sk_copy_descendant(newsk, oldsk); in sctp_sock_migrate()
6937 sk_add_bind_node(newsk, &pp->owner); in sctp_sock_migrate()
6938 sctp_sk(newsk)->bind_hash = pp; in sctp_sock_migrate()
6939 inet_sk(newsk)->inet_num = inet_sk(oldsk)->inet_num; in sctp_sock_migrate()
6956 __skb_queue_tail(&newsk->sk_receive_queue, skb); in sctp_sock_migrate()
6957 sctp_skb_set_owner_r_frag(skb, newsk); in sctp_sock_migrate()
6968 atomic_set(&sctp_sk(newsk)->pd_mode, assoc->ulpq.pd_mode); in sctp_sock_migrate()
6977 queue = &newsk->sk_receive_queue; in sctp_sock_migrate()
6987 sctp_skb_set_owner_r_frag(skb, newsk); in sctp_sock_migrate()
7000 sctp_skb_set_owner_r_frag(skb, newsk); in sctp_sock_migrate()
7003 sctp_skb_set_owner_r_frag(skb, newsk); in sctp_sock_migrate()
7020 lock_sock_nested(newsk, SINGLE_DEPTH_NESTING); in sctp_sock_migrate()
7021 sctp_assoc_migrate(assoc, newsk); in sctp_sock_migrate()
7026 if (sctp_state(assoc, CLOSED) && sctp_style(newsk, TCP)) in sctp_sock_migrate()
7027 newsk->sk_shutdown |= RCV_SHUTDOWN; in sctp_sock_migrate()
7029 newsk->sk_state = SCTP_SS_ESTABLISHED; in sctp_sock_migrate()
7030 sctp_release_sock(newsk); in sctp_sock_migrate()