/net/dccp/ |
D | minisocks.c | 107 struct sock *newsk = inet_csk_clone(sk, req, GFP_ATOMIC); in dccp_create_openreq_child() local 109 if (newsk != NULL) { in dccp_create_openreq_child() 111 struct inet_connection_sock *newicsk = inet_csk(newsk); in dccp_create_openreq_child() 112 struct dccp_sock *newdp = dccp_sk(newsk); in dccp_create_openreq_child() 113 struct dccp_minisock *newdmsk = dccp_msk(newsk); in dccp_create_openreq_child() 136 dccp_update_gss(newsk, dreq->dreq_iss); in dccp_create_openreq_child() 139 dccp_update_gsr(newsk, dreq->dreq_isr); in dccp_create_openreq_child() 158 if (dccp_feat_activate_values(newsk, &dreq->dreq_featneg)) { in dccp_create_openreq_child() 161 newsk->sk_destruct = NULL; in dccp_create_openreq_child() 162 sk_free(newsk); in dccp_create_openreq_child() [all …]
|
D | ipv6.c | 492 struct sock *newsk; in dccp_v6_request_recv_sock() local 499 newsk = dccp_v4_request_recv_sock(sk, skb, req, dst); in dccp_v6_request_recv_sock() 500 if (newsk == NULL) in dccp_v6_request_recv_sock() 503 newdp6 = (struct dccp6_sock *)newsk; in dccp_v6_request_recv_sock() 504 newdp = dccp_sk(newsk); in dccp_v6_request_recv_sock() 505 newinet = inet_sk(newsk); in dccp_v6_request_recv_sock() 507 newnp = inet6_sk(newsk); in dccp_v6_request_recv_sock() 519 inet_csk(newsk)->icsk_af_ops = &dccp_ipv6_mapped; in dccp_v6_request_recv_sock() 520 newsk->sk_backlog_rcv = dccp_v4_do_rcv; in dccp_v6_request_recv_sock() 536 dccp_sync_mss(newsk, inet_csk(newsk)->icsk_pmtu_cookie); in dccp_v6_request_recv_sock() [all …]
|
D | ipv4.c | 380 struct sock *newsk; in dccp_v4_request_recv_sock() local 388 newsk = dccp_create_openreq_child(sk, req, skb); in dccp_v4_request_recv_sock() 389 if (newsk == NULL) in dccp_v4_request_recv_sock() 392 sk_setup_caps(newsk, dst); in dccp_v4_request_recv_sock() 394 newinet = inet_sk(newsk); in dccp_v4_request_recv_sock() 405 dccp_sync_mss(newsk, dst_mtu(dst)); in dccp_v4_request_recv_sock() 407 __inet_hash_nolisten(newsk); in dccp_v4_request_recv_sock() 408 __inet_inherit_port(sk, newsk); in dccp_v4_request_recv_sock() 410 return newsk; in dccp_v4_request_recv_sock()
|
/net/sctp/ |
D | ipv6.c | 632 struct sock *newsk; in sctp_v6_create_accept_sk() local 637 newsk = sk_alloc(sock_net(sk), PF_INET6, GFP_KERNEL, sk->sk_prot); in sctp_v6_create_accept_sk() 638 if (!newsk) in sctp_v6_create_accept_sk() 641 sock_init_data(NULL, newsk); in sctp_v6_create_accept_sk() 643 newsk->sk_type = SOCK_STREAM; in sctp_v6_create_accept_sk() 645 newsk->sk_prot = sk->sk_prot; in sctp_v6_create_accept_sk() 646 newsk->sk_no_check = sk->sk_no_check; in sctp_v6_create_accept_sk() 647 newsk->sk_reuse = sk->sk_reuse; in sctp_v6_create_accept_sk() 649 newsk->sk_destruct = inet_sock_destruct; in sctp_v6_create_accept_sk() 650 newsk->sk_family = PF_INET6; in sctp_v6_create_accept_sk() [all …]
|
D | protocol.c | 594 struct sock *newsk = sk_alloc(sock_net(sk), PF_INET, GFP_KERNEL, in sctp_v4_create_accept_sk() local 597 if (!newsk) in sctp_v4_create_accept_sk() 600 sock_init_data(NULL, newsk); in sctp_v4_create_accept_sk() 602 newsk->sk_type = SOCK_STREAM; in sctp_v4_create_accept_sk() 604 newsk->sk_no_check = sk->sk_no_check; in sctp_v4_create_accept_sk() 605 newsk->sk_reuse = sk->sk_reuse; in sctp_v4_create_accept_sk() 606 newsk->sk_shutdown = sk->sk_shutdown; in sctp_v4_create_accept_sk() 608 newsk->sk_destruct = inet_sock_destruct; in sctp_v4_create_accept_sk() 609 newsk->sk_family = PF_INET; in sctp_v4_create_accept_sk() 610 newsk->sk_protocol = IPPROTO_SCTP; in sctp_v4_create_accept_sk() [all …]
|
D | socket.c | 3499 struct sock *newsk = NULL; in sctp_accept() local 3530 newsk = sp->pf->create_accept_sk(sk, asoc); in sctp_accept() 3531 if (!newsk) { in sctp_accept() 3539 sctp_sock_migrate(sk, newsk, asoc, SCTP_SOCKET_TCP); in sctp_accept() 3544 return newsk; in sctp_accept() 6706 static void sctp_sock_migrate(struct sock *oldsk, struct sock *newsk, in sctp_sock_migrate() argument 6711 struct sctp_sock *newsp = sctp_sk(newsk); in sctp_sock_migrate() 6721 newsk->sk_sndbuf = oldsk->sk_sndbuf; in sctp_sock_migrate() 6722 newsk->sk_rcvbuf = oldsk->sk_rcvbuf; in sctp_sock_migrate() 6724 inet_sk_copy_descendant(newsk, oldsk); in sctp_sock_migrate() [all …]
|
D | associola.c | 1084 void sctp_assoc_migrate(struct sctp_association *assoc, struct sock *newsk) in sctp_assoc_migrate() argument 1086 struct sctp_sock *newsp = sctp_sk(newsk); in sctp_assoc_migrate() 1107 assoc->base.sk = newsk; in sctp_assoc_migrate()
|
/net/core/ |
D | sock.c | 1004 struct sock *newsk; in sk_clone() local 1006 newsk = sk_prot_alloc(sk->sk_prot, priority, sk->sk_family); in sk_clone() 1007 if (newsk != NULL) { in sk_clone() 1010 sock_copy(newsk, sk); in sk_clone() 1013 get_net(sock_net(newsk)); in sk_clone() 1014 sk_node_init(&newsk->sk_node); in sk_clone() 1015 sock_lock_init(newsk); in sk_clone() 1016 bh_lock_sock(newsk); in sk_clone() 1017 newsk->sk_backlog.head = newsk->sk_backlog.tail = NULL; in sk_clone() 1019 atomic_set(&newsk->sk_rmem_alloc, 0); in sk_clone() [all …]
|
D | skbuff.c | 1843 void skb_queue_head(struct sk_buff_head *list, struct sk_buff *newsk) in skb_queue_head() argument 1848 __skb_queue_head(list, newsk); in skb_queue_head() 1863 void skb_queue_tail(struct sk_buff_head *list, struct sk_buff *newsk) in skb_queue_tail() argument 1868 __skb_queue_tail(list, newsk); in skb_queue_tail() 1901 void skb_append(struct sk_buff *old, struct sk_buff *newsk, struct sk_buff_head *list) in skb_append() argument 1906 __skb_queue_after(list, old, newsk); in skb_append() 1923 void skb_insert(struct sk_buff *old, struct sk_buff *newsk, struct sk_buff_head *list) in skb_insert() argument 1928 __skb_insert(newsk, old->prev, old, list); in skb_insert()
|
/net/phonet/ |
D | pep.c | 435 struct sock *newsk; in pep_connreq_rcv() local 488 newsk = sk_alloc(sock_net(sk), PF_PHONET, GFP_ATOMIC, sk->sk_prot); in pep_connreq_rcv() 489 if (!newsk) { in pep_connreq_rcv() 493 sock_init_data(NULL, newsk); in pep_connreq_rcv() 494 newsk->sk_state = TCP_SYN_RECV; in pep_connreq_rcv() 495 newsk->sk_backlog_rcv = pipe_do_rcv; in pep_connreq_rcv() 496 newsk->sk_protocol = sk->sk_protocol; in pep_connreq_rcv() 497 newsk->sk_destruct = pipe_destruct; in pep_connreq_rcv() 499 newpn = pep_sk(newsk); in pep_connreq_rcv() 511 BUG_ON(!skb_queue_empty(&newsk->sk_receive_queue)); in pep_connreq_rcv() [all …]
|
D | socket.c | 177 struct sock *newsk; in pn_socket_accept() local 180 newsk = sk->sk_prot->accept(sk, flags, &err); in pn_socket_accept() 181 if (!newsk) in pn_socket_accept() 184 lock_sock(newsk); in pn_socket_accept() 185 sock_graft(newsk, newsock); in pn_socket_accept() 187 release_sock(newsk); in pn_socket_accept()
|
/net/ipv4/ |
D | inet_connection_sock.c | 238 struct sock *newsk; in inet_csk_accept() local 264 newsk = reqsk_queue_get_child(&icsk->icsk_accept_queue, sk); in inet_csk_accept() 265 WARN_ON(newsk->sk_state == TCP_SYN_RECV); in inet_csk_accept() 268 return newsk; in inet_csk_accept() 270 newsk = NULL; in inet_csk_accept() 513 struct sock *newsk = sk_clone(sk, priority); in inet_csk_clone() local 515 if (newsk != NULL) { in inet_csk_clone() 516 struct inet_connection_sock *newicsk = inet_csk(newsk); in inet_csk_clone() 518 newsk->sk_state = TCP_SYN_RECV; in inet_csk_clone() 521 inet_sk(newsk)->dport = inet_rsk(req)->rmt_port; in inet_csk_clone() [all …]
|
D | tcp_minisocks.c | 385 struct sock *newsk = inet_csk_clone(sk, req, GFP_ATOMIC); in tcp_create_openreq_child() local 387 if (newsk != NULL) { in tcp_create_openreq_child() 390 struct inet_connection_sock *newicsk = inet_csk(newsk); in tcp_create_openreq_child() 394 newtp = tcp_sk(newsk); in tcp_create_openreq_child() 428 tcp_set_ca_state(newsk, TCP_CA_Open); in tcp_create_openreq_child() 429 tcp_init_xmit_timers(newsk); in tcp_create_openreq_child() 442 if (sock_flag(newsk, SOCK_KEEPOPEN)) in tcp_create_openreq_child() 443 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() 486 return newsk; in tcp_create_openreq_child()
|
D | tcp_ipv4.c | 1331 struct sock *newsk; in tcp_v4_syn_recv_sock() local 1342 newsk = tcp_create_openreq_child(sk, req, skb); in tcp_v4_syn_recv_sock() 1343 if (!newsk) in tcp_v4_syn_recv_sock() 1346 newsk->sk_gso_type = SKB_GSO_TCPV4; in tcp_v4_syn_recv_sock() 1347 sk_setup_caps(newsk, dst); in tcp_v4_syn_recv_sock() 1349 newtp = tcp_sk(newsk); in tcp_v4_syn_recv_sock() 1350 newinet = inet_sk(newsk); in tcp_v4_syn_recv_sock() 1359 inet_csk(newsk)->icsk_ext_hdr_len = 0; in tcp_v4_syn_recv_sock() 1361 inet_csk(newsk)->icsk_ext_hdr_len = newinet->opt->optlen; in tcp_v4_syn_recv_sock() 1364 tcp_mtup_init(newsk); in tcp_v4_syn_recv_sock() [all …]
|
/net/decnet/ |
D | af_decnet.c | 1071 struct sock *sk = sock->sk, *newsk; in dn_accept() local 1097 newsk = dn_alloc_sock(sock_net(sk), newsock, sk->sk_allocation); in dn_accept() 1098 if (newsk == NULL) { in dn_accept() 1105 dst_release(xchg(&newsk->sk_dst_cache, skb->dst)); in dn_accept() 1108 DN_SK(newsk)->state = DN_CR; in dn_accept() 1109 DN_SK(newsk)->addrrem = cb->src_port; in dn_accept() 1110 DN_SK(newsk)->services_rem = cb->services; in dn_accept() 1111 DN_SK(newsk)->info_rem = cb->info; in dn_accept() 1112 DN_SK(newsk)->segsize_rem = cb->segsize; in dn_accept() 1113 DN_SK(newsk)->accept_mode = DN_SK(sk)->accept_mode; in dn_accept() [all …]
|
/net/ipv6/ |
D | tcp_ipv6.c | 1266 struct sock *newsk; in tcp_v6_syn_recv_sock() local 1277 newsk = tcp_v4_syn_recv_sock(sk, skb, req, dst); in tcp_v6_syn_recv_sock() 1279 if (newsk == NULL) in tcp_v6_syn_recv_sock() 1282 newtcp6sk = (struct tcp6_sock *)newsk; in tcp_v6_syn_recv_sock() 1283 inet_sk(newsk)->pinet6 = &newtcp6sk->inet6; in tcp_v6_syn_recv_sock() 1285 newinet = inet_sk(newsk); in tcp_v6_syn_recv_sock() 1286 newnp = inet6_sk(newsk); in tcp_v6_syn_recv_sock() 1287 newtp = tcp_sk(newsk); in tcp_v6_syn_recv_sock() 1299 inet_csk(newsk)->icsk_af_ops = &ipv6_mapped; in tcp_v6_syn_recv_sock() 1300 newsk->sk_backlog_rcv = tcp_v4_do_rcv; in tcp_v6_syn_recv_sock() [all …]
|
/net/llc/ |
D | llc_conn.c | 703 struct sock *newsk = llc_sk_alloc(sock_net(sk), sk->sk_family, GFP_ATOMIC, in llc_create_incoming_sock() local 707 if (!newsk) in llc_create_incoming_sock() 709 newllc = llc_sk(newsk); in llc_create_incoming_sock() 714 llc_sap_add_socket(llc->sap, newsk); in llc_create_incoming_sock() 717 return newsk; in llc_create_incoming_sock() 744 struct sock *newsk = llc_create_incoming_sock(sk, skb->dev, in llc_conn_handler() local 746 if (!newsk) in llc_conn_handler() 748 skb_set_owner_r(skb, newsk); in llc_conn_handler()
|
D | af_llc.c | 602 struct sock *sk = sock->sk, *newsk; in llc_ui_accept() local 629 newsk = skb->sk; in llc_ui_accept() 631 llc_ui_sk_init(newsock, newsk); in llc_ui_accept() 632 sock_reset_flag(newsk, SOCK_ZAPPED); in llc_ui_accept() 633 newsk->sk_state = TCP_ESTABLISHED; in llc_ui_accept() 636 newllc = llc_sk(newsk); in llc_ui_accept()
|
/net/unix/ |
D | af_unix.c | 1022 struct sock *newsk = NULL; in unix_stream_connect() local 1049 newsk = unix_create1(sock_net(sk), NULL); in unix_stream_connect() 1050 if (newsk == NULL) in unix_stream_connect() 1054 skb = sock_wmalloc(newsk, 1, 0, GFP_KERNEL); in unix_stream_connect() 1127 err = security_unix_stream_connect(sock, other->sk_socket, newsk); in unix_stream_connect() 1136 unix_peer(newsk) = sk; in unix_stream_connect() 1137 newsk->sk_state = TCP_ESTABLISHED; in unix_stream_connect() 1138 newsk->sk_type = sk->sk_type; in unix_stream_connect() 1139 newsk->sk_peercred.pid = task_tgid_vnr(current); in unix_stream_connect() 1140 current_euid_egid(&newsk->sk_peercred.uid, &newsk->sk_peercred.gid); in unix_stream_connect() [all …]
|
/net/irda/ |
D | af_irda.c | 834 struct sock *newsk; in irda_accept() local 885 newsk = newsock->sk; in irda_accept() 886 if (newsk == NULL) in irda_accept() 889 newsk->sk_state = TCP_ESTABLISHED; in irda_accept() 891 new = irda_sk(newsk); in irda_accept()
|
/net/netrom/ |
D | af_netrom.c | 776 struct sock *newsk; in nr_accept() local 822 newsk = skb->sk; in nr_accept() 823 sock_graft(newsk, newsock); in nr_accept()
|
/net/x25/ |
D | af_x25.c | 788 struct sock *newsk; in x25_accept() local 807 newsk = skb->sk; in x25_accept() 808 sock_graft(newsk, newsock); in x25_accept()
|
/net/rose/ |
D | af_rose.c | 891 struct sock *newsk; in rose_accept() local 938 newsk = skb->sk; in rose_accept() 939 sock_graft(newsk, newsock); in rose_accept()
|
/net/ax25/ |
D | af_ax25.c | 1314 struct sock *newsk; in ax25_accept() local 1364 newsk = skb->sk; in ax25_accept() 1365 sock_graft(newsk, newsock); in ax25_accept()
|