Home
last modified time | relevance | path

Searched refs:newsk (Results 1 – 25 of 40) sorted by relevance

12

/Linux-v4.19/net/dccp/
Dipv6.c409 struct sock *newsk; in dccp_v6_request_recv_sock() local
415 newsk = dccp_v4_request_recv_sock(sk, skb, req, dst, in dccp_v6_request_recv_sock()
417 if (newsk == NULL) in dccp_v6_request_recv_sock()
420 newdp6 = (struct dccp6_sock *)newsk; in dccp_v6_request_recv_sock()
421 newinet = inet_sk(newsk); in dccp_v6_request_recv_sock()
423 newnp = inet6_sk(newsk); in dccp_v6_request_recv_sock()
427 newnp->saddr = newsk->sk_v6_rcv_saddr; in dccp_v6_request_recv_sock()
429 inet_csk(newsk)->icsk_af_ops = &dccp_ipv6_mapped; in dccp_v6_request_recv_sock()
430 newsk->sk_backlog_rcv = dccp_v4_do_rcv; in dccp_v6_request_recv_sock()
449 dccp_sync_mss(newsk, inet_csk(newsk)->icsk_pmtu_cookie); in dccp_v6_request_recv_sock()
[all …]
Dminisocks.c91 struct sock *newsk = inet_csk_clone_lock(sk, req, GFP_ATOMIC); in dccp_create_openreq_child() local
93 if (newsk != NULL) { in dccp_create_openreq_child()
95 struct inet_connection_sock *newicsk = inet_csk(newsk); in dccp_create_openreq_child()
96 struct dccp_sock *newdp = dccp_sk(newsk); in dccp_create_openreq_child()
127 if (dccp_feat_activate_values(newsk, &dreq->dreq_featneg)) { in dccp_create_openreq_child()
128 sk_free_unlock_clone(newsk); in dccp_create_openreq_child()
131 dccp_init_xmit_timers(newsk); in dccp_create_openreq_child()
135 return newsk; in dccp_create_openreq_child()
Dipv4.c403 struct sock *newsk; in dccp_v4_request_recv_sock() local
408 newsk = dccp_create_openreq_child(sk, req, skb); in dccp_v4_request_recv_sock()
409 if (newsk == NULL) in dccp_v4_request_recv_sock()
412 newinet = inet_sk(newsk); in dccp_v4_request_recv_sock()
414 sk_daddr_set(newsk, ireq->ir_rmt_addr); in dccp_v4_request_recv_sock()
415 sk_rcv_saddr_set(newsk, ireq->ir_loc_addr); in dccp_v4_request_recv_sock()
422 if (dst == NULL && (dst = inet_csk_route_child_sock(sk, newsk, req)) == NULL) in dccp_v4_request_recv_sock()
425 sk_setup_caps(newsk, dst); in dccp_v4_request_recv_sock()
427 dccp_sync_mss(newsk, dst_mtu(dst)); in dccp_v4_request_recv_sock()
429 if (__inet_inherit_port(sk, newsk) < 0) in dccp_v4_request_recv_sock()
[all …]
/Linux-v4.19/net/ipv6/
Dtcp_ipv6.c1072 struct sock *newsk; in tcp_v6_syn_recv_sock() local
1083 newsk = tcp_v4_syn_recv_sock(sk, skb, req, dst, in tcp_v6_syn_recv_sock()
1086 if (!newsk) in tcp_v6_syn_recv_sock()
1089 newtcp6sk = (struct tcp6_sock *)newsk; in tcp_v6_syn_recv_sock()
1090 inet_sk(newsk)->pinet6 = &newtcp6sk->inet6; in tcp_v6_syn_recv_sock()
1092 newinet = inet_sk(newsk); in tcp_v6_syn_recv_sock()
1093 newnp = inet6_sk(newsk); in tcp_v6_syn_recv_sock()
1094 newtp = tcp_sk(newsk); in tcp_v6_syn_recv_sock()
1098 newnp->saddr = newsk->sk_v6_rcv_saddr; in tcp_v6_syn_recv_sock()
1100 inet_csk(newsk)->icsk_af_ops = &ipv6_mapped; in tcp_v6_syn_recv_sock()
[all …]
/Linux-v4.19/net/core/
Dsock.c1651 struct sock *newsk; in sk_clone_lock() local
1654 newsk = sk_prot_alloc(sk->sk_prot, priority, sk->sk_family); in sk_clone_lock()
1655 if (newsk != NULL) { in sk_clone_lock()
1658 sock_copy(newsk, sk); in sk_clone_lock()
1660 newsk->sk_prot_creator = sk->sk_prot; in sk_clone_lock()
1663 if (likely(newsk->sk_net_refcnt)) in sk_clone_lock()
1664 get_net(sock_net(newsk)); in sk_clone_lock()
1665 sk_node_init(&newsk->sk_node); in sk_clone_lock()
1666 sock_lock_init(newsk); in sk_clone_lock()
1667 bh_lock_sock(newsk); in sk_clone_lock()
[all …]
/Linux-v4.19/net/sctp/
Dipv6.c447 static void sctp_v6_copy_ip_options(struct sock *sk, struct sock *newsk) in sctp_v6_copy_ip_options() argument
452 newnp = inet6_sk(newsk); in sctp_v6_copy_ip_options()
457 opt = ipv6_dup_options(newsk, opt); in sctp_v6_copy_ip_options()
720 struct sock *newsk; in sctp_v6_create_accept_sk() local
724 newsk = sk_alloc(sock_net(sk), PF_INET6, GFP_KERNEL, sk->sk_prot, kern); in sctp_v6_create_accept_sk()
725 if (!newsk) in sctp_v6_create_accept_sk()
728 sock_init_data(NULL, newsk); in sctp_v6_create_accept_sk()
730 sctp_copy_sock(newsk, sk, asoc); in sctp_v6_create_accept_sk()
733 newsctp6sk = (struct sctp6_sock *)newsk; in sctp_v6_create_accept_sk()
734 inet_sk(newsk)->pinet6 = &newsctp6sk->inet6; in sctp_v6_create_accept_sk()
[all …]
Dprotocol.c191 static void sctp_v4_copy_ip_options(struct sock *sk, struct sock *newsk) in sctp_v4_copy_ip_options() argument
196 newinet = inet_sk(newsk); in sctp_v4_copy_ip_options()
201 newopt = sock_kmalloc(newsk, sizeof(*inet_opt) + in sctp_v4_copy_ip_options()
571 struct sock *newsk = sk_alloc(sock_net(sk), PF_INET, GFP_KERNEL, in sctp_v4_create_accept_sk() local
575 if (!newsk) in sctp_v4_create_accept_sk()
578 sock_init_data(NULL, newsk); in sctp_v4_create_accept_sk()
580 sctp_copy_sock(newsk, sk, asoc); in sctp_v4_create_accept_sk()
581 sock_reset_flag(newsk, SOCK_ZAPPED); in sctp_v4_create_accept_sk()
583 sctp_v4_copy_ip_options(sk, newsk); in sctp_v4_create_accept_sk()
585 newinet = inet_sk(newsk); in sctp_v4_create_accept_sk()
[all …]
Dsocket.c105 static void sctp_sock_migrate(struct sock *oldsk, struct sock *newsk,
4587 struct sock *newsk = NULL; in sctp_accept() local
4618 newsk = sp->pf->create_accept_sk(sk, asoc, kern); in sctp_accept()
4619 if (!newsk) { in sctp_accept()
4627 sctp_sock_migrate(sk, newsk, asoc, SCTP_SOCKET_TCP); in sctp_accept()
4632 return newsk; in sctp_accept()
8770 void sctp_copy_sock(struct sock *newsk, struct sock *sk, in sctp_copy_sock() argument
8778 newsk->sk_type = sk->sk_type; in sctp_copy_sock()
8779 newsk->sk_bound_dev_if = sk->sk_bound_dev_if; in sctp_copy_sock()
8780 newsk->sk_flags = sk->sk_flags; in sctp_copy_sock()
[all …]
/Linux-v4.19/net/decnet/
Daf_decnet.c1076 struct sock *sk = sock->sk, *newsk; in dn_accept() local
1103 newsk = dn_alloc_sock(sock_net(sk), newsock, sk->sk_allocation, kern); in dn_accept()
1104 if (newsk == NULL) { in dn_accept()
1112 sk_dst_set(newsk, dst); in dn_accept()
1115 DN_SK(newsk)->state = DN_CR; in dn_accept()
1116 DN_SK(newsk)->addrrem = cb->src_port; in dn_accept()
1117 DN_SK(newsk)->services_rem = cb->services; in dn_accept()
1118 DN_SK(newsk)->info_rem = cb->info; in dn_accept()
1119 DN_SK(newsk)->segsize_rem = cb->segsize; in dn_accept()
1120 DN_SK(newsk)->accept_mode = DN_SK(sk)->accept_mode; in dn_accept()
[all …]
/Linux-v4.19/net/ipv4/
Dinet_connection_sock.c439 struct sock *newsk; in inet_csk_accept() local
465 newsk = req->sk; in inet_csk_accept()
486 return newsk; in inet_csk_accept()
488 newsk = NULL; in inet_csk_accept()
575 struct sock *newsk, in inet_csk_route_child_sock() argument
580 struct inet_sock *newinet = inet_sk(newsk); in inet_csk_route_child_sock()
787 struct sock *newsk = sk_clone_lock(sk, priority); in inet_csk_clone_lock() local
789 if (newsk) { in inet_csk_clone_lock()
790 struct inet_connection_sock *newicsk = inet_csk(newsk); in inet_csk_clone_lock()
792 inet_sk_set_state(newsk, TCP_SYN_RECV); in inet_csk_clone_lock()
[all …]
Dtcp_minisocks.c452 struct sock *newsk = inet_csk_clone_lock(sk, req, GFP_ATOMIC); in tcp_create_openreq_child() local
458 if (!newsk) in tcp_create_openreq_child()
461 newicsk = inet_csk(newsk); in tcp_create_openreq_child()
462 newtp = tcp_sk(newsk); in tcp_create_openreq_child()
494 newsk->sk_txhash = treq->txhash; in tcp_create_openreq_child()
509 tcp_init_xmit_timers(newsk); in tcp_create_openreq_child()
519 if (sock_flag(newsk, SOCK_KEEPOPEN)) in tcp_create_openreq_child()
520 inet_csk_reset_keepalive_timer(newsk, in tcp_create_openreq_child()
550 if (newtp->af_specific->md5_lookup(sk, newsk)) in tcp_create_openreq_child()
569 return newsk; in tcp_create_openreq_child()
Dtcp_ipv4.c1407 struct sock *newsk; in tcp_v4_syn_recv_sock() local
1416 newsk = tcp_create_openreq_child(sk, req, skb); in tcp_v4_syn_recv_sock()
1417 if (!newsk) in tcp_v4_syn_recv_sock()
1420 newsk->sk_gso_type = SKB_GSO_TCPV4; in tcp_v4_syn_recv_sock()
1421 inet_sk_rx_dst_set(newsk, skb); in tcp_v4_syn_recv_sock()
1423 newtp = tcp_sk(newsk); in tcp_v4_syn_recv_sock()
1424 newinet = inet_sk(newsk); in tcp_v4_syn_recv_sock()
1426 sk_daddr_set(newsk, ireq->ir_rmt_addr); in tcp_v4_syn_recv_sock()
1427 sk_rcv_saddr_set(newsk, ireq->ir_loc_addr); in tcp_v4_syn_recv_sock()
1428 newsk->sk_bound_dev_if = ireq->ir_iif; in tcp_v4_syn_recv_sock()
[all …]
/Linux-v4.19/net/phonet/
Dpep.c779 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()
852 if (!newsk) { in pep_sock_accept()
858 sock_init_data(NULL, newsk); in pep_sock_accept()
859 newsk->sk_state = TCP_SYN_RECV; in pep_sock_accept()
860 newsk->sk_backlog_rcv = pipe_do_rcv; in pep_sock_accept()
[all …]
Dsocket.c311 struct sock *newsk; in pn_socket_accept() local
317 newsk = sk->sk_prot->accept(sk, flags, &err, kern); in pn_socket_accept()
318 if (!newsk) in pn_socket_accept()
321 lock_sock(newsk); in pn_socket_accept()
322 sock_graft(newsk, newsock); in pn_socket_accept()
324 release_sock(newsk); in pn_socket_accept()
/Linux-v4.19/drivers/crypto/chelsio/chtls/
Dchtls_cm.c994 struct sock *lsk, struct sock *newsk) in inet_inherit_port() argument
997 __inet_inherit_port(lsk, newsk); in inet_inherit_port()
1025 struct sock *newsk; in chtls_recv_sock() local
1031 newsk = tcp_create_openreq_child(lsk, oreq, cdev->askb); in chtls_recv_sock()
1032 if (!newsk) in chtls_recv_sock()
1035 dst = inet_csk_route_child_sock(lsk, newsk, oreq); in chtls_recv_sock()
1057 newsk->sk_user_data = csk; in chtls_recv_sock()
1058 newsk->sk_backlog_rcv = chtls_backlog_rcv; in chtls_recv_sock()
1060 tp = tcp_sk(newsk); in chtls_recv_sock()
1061 newinet = inet_sk(newsk); in chtls_recv_sock()
[all …]
/Linux-v4.19/net/tipc/
Dtopsrv.c459 struct sock *newsk; in tipc_topsrv_accept() local
473 newsk = newsock->sk; in tipc_topsrv_accept()
474 write_lock_bh(&newsk->sk_callback_lock); in tipc_topsrv_accept()
475 newsk->sk_data_ready = tipc_conn_data_ready; in tipc_topsrv_accept()
476 newsk->sk_write_space = tipc_conn_write_space; in tipc_topsrv_accept()
477 newsk->sk_user_data = con; in tipc_topsrv_accept()
479 write_unlock_bh(&newsk->sk_callback_lock); in tipc_topsrv_accept()
482 newsk->sk_data_ready(newsk); in tipc_topsrv_accept()
/Linux-v4.19/security/selinux/include/
Dnetlabel.h60 void selinux_netlbl_sctp_sk_clone(struct sock *sk, struct sock *newsk);
136 struct sock *newsk) in selinux_netlbl_sctp_sk_clone() argument
/Linux-v4.19/net/llc/
Dllc_conn.c785 struct sock *newsk = llc_sk_alloc(sock_net(sk), sk->sk_family, GFP_ATOMIC, in llc_create_incoming_sock() local
789 if (!newsk) in llc_create_incoming_sock()
791 newllc = llc_sk(newsk); in llc_create_incoming_sock()
796 llc_sap_add_socket(llc->sap, newsk); in llc_create_incoming_sock()
799 return newsk; in llc_create_incoming_sock()
826 struct sock *newsk = llc_create_incoming_sock(sk, skb->dev, in llc_conn_handler() local
828 if (!newsk) in llc_conn_handler()
830 skb_set_owner_r(skb, newsk); in llc_conn_handler()
Daf_llc.c665 struct sock *sk = sock->sk, *newsk; in llc_ui_accept() local
692 newsk = skb->sk; in llc_ui_accept()
694 llc_ui_sk_init(newsock, newsk); in llc_ui_accept()
695 sock_reset_flag(newsk, SOCK_ZAPPED); in llc_ui_accept()
696 newsk->sk_state = TCP_ESTABLISHED; in llc_ui_accept()
699 newllc = llc_sk(newsk); in llc_ui_accept()
/Linux-v4.19/net/unix/
Daf_unix.c1208 struct sock *newsk = NULL; in unix_stream_connect() local
1235 newsk = unix_create1(sock_net(sk), NULL, 0); in unix_stream_connect()
1236 if (newsk == NULL) in unix_stream_connect()
1240 skb = sock_wmalloc(newsk, 1, 0, GFP_KERNEL); in unix_stream_connect()
1315 err = security_unix_stream_connect(sk, other, newsk); in unix_stream_connect()
1324 unix_peer(newsk) = sk; in unix_stream_connect()
1325 newsk->sk_state = TCP_ESTABLISHED; in unix_stream_connect()
1326 newsk->sk_type = sk->sk_type; in unix_stream_connect()
1327 init_peercred(newsk); in unix_stream_connect()
1328 newu = unix_sk(newsk); in unix_stream_connect()
[all …]
/Linux-v4.19/include/linux/
Dskbuff.h1691 void skb_insert(struct sk_buff *old, struct sk_buff *newsk,
1693 static inline void __skb_insert(struct sk_buff *newsk, in __skb_insert() argument
1697 newsk->next = next; in __skb_insert()
1698 newsk->prev = prev; in __skb_insert()
1699 next->prev = prev->next = newsk; in __skb_insert()
1793 struct sk_buff *newsk) in __skb_queue_after() argument
1795 __skb_insert(newsk, prev, prev->next, list); in __skb_queue_after()
1798 void skb_append(struct sk_buff *old, struct sk_buff *newsk,
1803 struct sk_buff *newsk) in __skb_queue_before() argument
1805 __skb_insert(newsk, next->prev, next, list); in __skb_queue_before()
[all …]
Dsecurity.h1201 int security_unix_stream_connect(struct sock *sock, struct sock *other, struct sock *newsk);
1225 void security_sk_clone(const struct sock *sk, struct sock *newsk);
1231 void security_inet_csk_clone(struct sock *newsk,
1248 struct sock *newsk);
1253 struct sock *newsk) in security_unix_stream_connect() argument
1374 static inline void security_sk_clone(const struct sock *sk, struct sock *newsk) in security_sk_clone() argument
1396 static inline void security_inet_csk_clone(struct sock *newsk, in security_inet_csk_clone() argument
1463 struct sock *newsk) in security_sctp_sk_clone() argument
Dlsm_hooks.h1663 struct sock *newsk);
1693 void (*sk_clone_security)(const struct sock *sk, struct sock *newsk);
1698 void (*inet_csk_clone)(struct sock *newsk,
1717 struct sock *newsk);
/Linux-v4.19/security/
Dsecurity.c1358 int security_unix_stream_connect(struct sock *sock, struct sock *other, struct sock *newsk) in security_unix_stream_connect() argument
1360 return call_int_hook(unix_stream_connect, 0, sock, other, newsk); in security_unix_stream_connect()
1474 void security_sk_clone(const struct sock *sk, struct sock *newsk) in security_sk_clone() argument
1476 call_void_hook(sk_clone_security, sk, newsk); in security_sk_clone()
1505 void security_inet_csk_clone(struct sock *newsk, in security_inet_csk_clone() argument
1508 call_void_hook(inet_csk_clone, newsk, req); in security_inet_csk_clone()
1587 struct sock *newsk) in security_sctp_sk_clone() argument
1589 call_void_hook(sctp_sk_clone, ep, sk, newsk); in security_sctp_sk_clone()
/Linux-v4.19/security/selinux/
Dnetlabel.c389 void selinux_netlbl_sctp_sk_clone(struct sock *sk, struct sock *newsk) in selinux_netlbl_sctp_sk_clone() argument
392 struct sk_security_struct *newsksec = newsk->sk_security; in selinux_netlbl_sctp_sk_clone()

12