/net/dccp/ |
D | ipv6.c | 458 struct sock *newsk; in dccp_v6_request_recv_sock() local 464 newsk = dccp_v4_request_recv_sock(sk, skb, req, dst); in dccp_v6_request_recv_sock() 465 if (newsk == NULL) in dccp_v6_request_recv_sock() 468 newdp6 = (struct dccp6_sock *)newsk; in dccp_v6_request_recv_sock() 469 newinet = inet_sk(newsk); in dccp_v6_request_recv_sock() 471 newnp = inet6_sk(newsk); in dccp_v6_request_recv_sock() 481 inet_csk(newsk)->icsk_af_ops = &dccp_ipv6_mapped; in dccp_v6_request_recv_sock() 482 newsk->sk_backlog_rcv = dccp_v4_do_rcv; in dccp_v6_request_recv_sock() 501 dccp_sync_mss(newsk, inet_csk(newsk)->icsk_pmtu_cookie); in dccp_v6_request_recv_sock() 503 return newsk; in dccp_v6_request_recv_sock() [all …]
|
D | minisocks.c | 103 struct sock *newsk = inet_csk_clone_lock(sk, req, GFP_ATOMIC); in dccp_create_openreq_child() local 105 if (newsk != NULL) { in dccp_create_openreq_child() 107 struct inet_connection_sock *newicsk = inet_csk(newsk); in dccp_create_openreq_child() 108 struct dccp_sock *newdp = dccp_sk(newsk); in dccp_create_openreq_child() 139 if (dccp_feat_activate_values(newsk, &dreq->dreq_featneg)) { in dccp_create_openreq_child() 142 newsk->sk_destruct = NULL; in dccp_create_openreq_child() 143 sk_free(newsk); in dccp_create_openreq_child() 146 dccp_init_xmit_timers(newsk); in dccp_create_openreq_child() 150 return newsk; in dccp_create_openreq_child()
|
D | ipv4.c | 401 struct sock *newsk; in dccp_v4_request_recv_sock() local 406 newsk = dccp_create_openreq_child(sk, req, skb); in dccp_v4_request_recv_sock() 407 if (newsk == NULL) in dccp_v4_request_recv_sock() 410 newinet = inet_sk(newsk); in dccp_v4_request_recv_sock() 421 if (dst == NULL && (dst = inet_csk_route_child_sock(sk, newsk, req)) == NULL) in dccp_v4_request_recv_sock() 424 sk_setup_caps(newsk, dst); in dccp_v4_request_recv_sock() 426 dccp_sync_mss(newsk, dst_mtu(dst)); in dccp_v4_request_recv_sock() 428 if (__inet_inherit_port(sk, newsk) < 0) in dccp_v4_request_recv_sock() 430 __inet_hash_nolisten(newsk, NULL); in dccp_v4_request_recv_sock() 432 return newsk; in dccp_v4_request_recv_sock() [all …]
|
/net/core/ |
D | sock.c | 1398 static void sk_update_clone(const struct sock *sk, struct sock *newsk) in sk_update_clone() argument 1401 sock_update_memcg(newsk); in sk_update_clone() 1413 struct sock *newsk; in sk_clone_lock() local 1415 newsk = sk_prot_alloc(sk->sk_prot, priority, sk->sk_family); in sk_clone_lock() 1416 if (newsk != NULL) { in sk_clone_lock() 1419 sock_copy(newsk, sk); in sk_clone_lock() 1422 get_net(sock_net(newsk)); in sk_clone_lock() 1423 sk_node_init(&newsk->sk_node); in sk_clone_lock() 1424 sock_lock_init(newsk); in sk_clone_lock() 1425 bh_lock_sock(newsk); in sk_clone_lock() [all …]
|
D | skbuff.c | 2193 void skb_queue_head(struct sk_buff_head *list, struct sk_buff *newsk) in skb_queue_head() argument 2198 __skb_queue_head(list, newsk); in skb_queue_head() 2214 void skb_queue_tail(struct sk_buff_head *list, struct sk_buff *newsk) in skb_queue_tail() argument 2219 __skb_queue_tail(list, newsk); in skb_queue_tail() 2254 void skb_append(struct sk_buff *old, struct sk_buff *newsk, struct sk_buff_head *list) in skb_append() argument 2259 __skb_queue_after(list, old, newsk); in skb_append() 2276 void skb_insert(struct sk_buff *old, struct sk_buff *newsk, struct sk_buff_head *list) in skb_insert() argument 2281 __skb_insert(newsk, old->prev, old, list); in skb_insert()
|
/net/ipv6/ |
D | tcp_ipv6.c | 1103 struct sock *newsk; in tcp_v6_syn_recv_sock() local 1114 newsk = tcp_v4_syn_recv_sock(sk, skb, req, dst); in tcp_v6_syn_recv_sock() 1116 if (newsk == NULL) in tcp_v6_syn_recv_sock() 1119 newtcp6sk = (struct tcp6_sock *)newsk; in tcp_v6_syn_recv_sock() 1120 inet_sk(newsk)->pinet6 = &newtcp6sk->inet6; in tcp_v6_syn_recv_sock() 1122 newinet = inet_sk(newsk); in tcp_v6_syn_recv_sock() 1123 newnp = inet6_sk(newsk); in tcp_v6_syn_recv_sock() 1124 newtp = tcp_sk(newsk); in tcp_v6_syn_recv_sock() 1134 inet_csk(newsk)->icsk_af_ops = &ipv6_mapped; in tcp_v6_syn_recv_sock() 1135 newsk->sk_backlog_rcv = tcp_v4_do_rcv; in tcp_v6_syn_recv_sock() [all …]
|
/net/ipv4/ |
D | inet_connection_sock.c | 308 struct sock *newsk; in inet_csk_accept() local 335 newsk = req->sk; in inet_csk_accept() 356 return newsk; in inet_csk_accept() 358 newsk = NULL; in inet_csk_accept() 444 struct sock *newsk, in inet_csk_route_child_sock() argument 448 struct inet_sock *newinet = inet_sk(newsk); in inet_csk_route_child_sock() 680 struct sock *newsk = sk_clone_lock(sk, priority); in inet_csk_clone_lock() local 682 if (newsk != NULL) { in inet_csk_clone_lock() 683 struct inet_connection_sock *newicsk = inet_csk(newsk); in inet_csk_clone_lock() 685 newsk->sk_state = TCP_SYN_RECV; in inet_csk_clone_lock() [all …]
|
D | tcp_minisocks.c | 383 struct sock *newsk = inet_csk_clone_lock(sk, req, GFP_ATOMIC); in tcp_create_openreq_child() local 385 if (newsk != NULL) { in tcp_create_openreq_child() 388 struct inet_connection_sock *newicsk = inet_csk(newsk); in tcp_create_openreq_child() 389 struct tcp_sock *newtp = tcp_sk(newsk); in tcp_create_openreq_child() 429 tcp_set_ca_state(newsk, TCP_CA_Open); in tcp_create_openreq_child() 430 tcp_init_xmit_timers(newsk); in tcp_create_openreq_child() 441 if (sock_flag(newsk, SOCK_KEEPOPEN)) in tcp_create_openreq_child() 442 inet_csk_reset_keepalive_timer(newsk, in tcp_create_openreq_child() 476 if (newtp->af_specific->md5_lookup(sk, newsk)) in tcp_create_openreq_child() 488 return newsk; in tcp_create_openreq_child()
|
D | tcp_ipv4.c | 1655 struct sock *newsk; in tcp_v4_syn_recv_sock() local 1664 newsk = tcp_create_openreq_child(sk, req, skb); in tcp_v4_syn_recv_sock() 1665 if (!newsk) in tcp_v4_syn_recv_sock() 1668 newsk->sk_gso_type = SKB_GSO_TCPV4; in tcp_v4_syn_recv_sock() 1669 inet_sk_rx_dst_set(newsk, skb); in tcp_v4_syn_recv_sock() 1671 newtp = tcp_sk(newsk); in tcp_v4_syn_recv_sock() 1672 newinet = inet_sk(newsk); in tcp_v4_syn_recv_sock() 1683 inet_csk(newsk)->icsk_ext_hdr_len = 0; in tcp_v4_syn_recv_sock() 1685 inet_csk(newsk)->icsk_ext_hdr_len = inet_opt->opt.optlen; in tcp_v4_syn_recv_sock() 1689 dst = inet_csk_route_child_sock(sk, newsk, req); in tcp_v4_syn_recv_sock() [all …]
|
/net/decnet/ |
D | af_decnet.c | 1071 struct sock *sk = sock->sk, *newsk; in dn_accept() local 1098 newsk = dn_alloc_sock(sock_net(sk), newsock, sk->sk_allocation); in dn_accept() 1099 if (newsk == NULL) { in dn_accept() 1107 sk_dst_set(newsk, dst); in dn_accept() 1110 DN_SK(newsk)->state = DN_CR; in dn_accept() 1111 DN_SK(newsk)->addrrem = cb->src_port; in dn_accept() 1112 DN_SK(newsk)->services_rem = cb->services; in dn_accept() 1113 DN_SK(newsk)->info_rem = cb->info; in dn_accept() 1114 DN_SK(newsk)->segsize_rem = cb->segsize; in dn_accept() 1115 DN_SK(newsk)->accept_mode = DN_SK(sk)->accept_mode; in dn_accept() [all …]
|
/net/sctp/ |
D | ipv6.c | 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() [all …]
|
D | socket.c | 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() [all …]
|
D | protocol.c | 554 struct sock *newsk = sk_alloc(sock_net(sk), PF_INET, GFP_KERNEL, in sctp_v4_create_accept_sk() local 558 if (!newsk) in sctp_v4_create_accept_sk() 561 sock_init_data(NULL, newsk); in sctp_v4_create_accept_sk() 563 sctp_copy_sock(newsk, sk, asoc); in sctp_v4_create_accept_sk() 564 sock_reset_flag(newsk, SOCK_ZAPPED); in sctp_v4_create_accept_sk() 566 newinet = inet_sk(newsk); in sctp_v4_create_accept_sk() 570 sk_refcnt_debug_inc(newsk); in sctp_v4_create_accept_sk() 572 if (newsk->sk_prot->init(newsk)) { in sctp_v4_create_accept_sk() 573 sk_common_release(newsk); in sctp_v4_create_accept_sk() 574 newsk = NULL; in sctp_v4_create_accept_sk() [all …]
|
D | associola.c | 1175 void sctp_assoc_migrate(struct sctp_association *assoc, struct sock *newsk) in sctp_assoc_migrate() argument 1177 struct sctp_sock *newsp = sctp_sk(newsk); in sctp_assoc_migrate() 1198 assoc->base.sk = newsk; in sctp_assoc_migrate()
|
/net/phonet/ |
D | pep.c | 779 struct sock *newsk = NULL; in pep_sock_accept() local 841 newsk = pep_find_pipe(&pn->hlist, &dst, pipe_handle); in pep_sock_accept() 842 if (unlikely(newsk)) { in pep_sock_accept() 843 __sock_put(newsk); in pep_sock_accept() 844 newsk = NULL; in pep_sock_accept() 850 newsk = sk_alloc(sock_net(sk), PF_PHONET, GFP_KERNEL, sk->sk_prot); in pep_sock_accept() 851 if (!newsk) { in pep_sock_accept() 857 sock_init_data(NULL, newsk); in pep_sock_accept() 858 newsk->sk_state = TCP_SYN_RECV; in pep_sock_accept() 859 newsk->sk_backlog_rcv = pipe_do_rcv; in pep_sock_accept() [all …]
|
D | socket.c | 307 struct sock *newsk; in pn_socket_accept() local 313 newsk = sk->sk_prot->accept(sk, flags, &err); in pn_socket_accept() 314 if (!newsk) in pn_socket_accept() 317 lock_sock(newsk); in pn_socket_accept() 318 sock_graft(newsk, newsock); in pn_socket_accept() 320 release_sock(newsk); in pn_socket_accept()
|
/net/llc/ |
D | llc_conn.c | 770 struct sock *newsk = llc_sk_alloc(sock_net(sk), sk->sk_family, GFP_ATOMIC, in llc_create_incoming_sock() local 774 if (!newsk) in llc_create_incoming_sock() 776 newllc = llc_sk(newsk); in llc_create_incoming_sock() 781 llc_sap_add_socket(llc->sap, newsk); in llc_create_incoming_sock() 784 return newsk; in llc_create_incoming_sock() 811 struct sock *newsk = llc_create_incoming_sock(sk, skb->dev, in llc_conn_handler() local 813 if (!newsk) in llc_conn_handler() 815 skb_set_owner_r(skb, newsk); in llc_conn_handler()
|
D | af_llc.c | 647 struct sock *sk = sock->sk, *newsk; in llc_ui_accept() local 674 newsk = skb->sk; in llc_ui_accept() 676 llc_ui_sk_init(newsock, newsk); in llc_ui_accept() 677 sock_reset_flag(newsk, SOCK_ZAPPED); in llc_ui_accept() 678 newsk->sk_state = TCP_ESTABLISHED; in llc_ui_accept() 681 newllc = llc_sk(newsk); in llc_ui_accept()
|
/net/unix/ |
D | af_unix.c | 1177 struct sock *newsk = NULL; in unix_stream_connect() local 1204 newsk = unix_create1(sock_net(sk), NULL); in unix_stream_connect() 1205 if (newsk == NULL) in unix_stream_connect() 1209 skb = sock_wmalloc(newsk, 1, 0, GFP_KERNEL); in unix_stream_connect() 1284 err = security_unix_stream_connect(sk, other, newsk); in unix_stream_connect() 1293 unix_peer(newsk) = sk; in unix_stream_connect() 1294 newsk->sk_state = TCP_ESTABLISHED; in unix_stream_connect() 1295 newsk->sk_type = sk->sk_type; in unix_stream_connect() 1296 init_peercred(newsk); in unix_stream_connect() 1297 newu = unix_sk(newsk); in unix_stream_connect() [all …]
|
/net/irda/ |
D | af_irda.c | 847 struct sock *newsk; in irda_accept() local 904 newsk = newsock->sk; in irda_accept() 906 if (newsk == NULL) in irda_accept() 909 newsk->sk_state = TCP_ESTABLISHED; in irda_accept() 911 new = irda_sk(newsk); in irda_accept()
|
/net/netrom/ |
D | af_netrom.c | 771 struct sock *newsk; in nr_accept() local 817 newsk = skb->sk; in nr_accept() 818 sock_graft(newsk, newsock); in nr_accept()
|
/net/rose/ |
D | af_rose.c | 876 struct sock *newsk; in rose_accept() local 923 newsk = skb->sk; in rose_accept() 924 sock_graft(newsk, newsock); in rose_accept()
|
/net/x25/ |
D | af_x25.c | 856 struct sock *newsk; in x25_accept() local 879 newsk = skb->sk; in x25_accept() 880 sock_graft(newsk, newsock); in x25_accept()
|
/net/ax25/ |
D | af_ax25.c | 1323 struct sock *newsk; in ax25_accept() local 1373 newsk = skb->sk; in ax25_accept() 1374 sock_graft(newsk, newsock); in ax25_accept()
|