| /linux/net/dccp/ |
| H A D | ipv6.c | |
| H A D | minisocks.c | |
| H A D | ipv4.c | |
| /linux/net/ipv6/ |
| H A D | tcp_ipv6.c | 1325 struct sock *newsk; 1337 newsk = tcp_v4_syn_recv_sock(sk, skb, req, dst, 1340 if (!newsk) 1343 newinet = inet_sk(newsk); 1344 newinet->pinet6 = tcp_inet6_sk(newsk); 1347 newnp = tcp_inet6_sk(newsk); 1348 newtp = tcp_sk(newsk); 1352 newnp->saddr = newsk->sk_v6_rcv_saddr; 1354 inet_csk(newsk)->icsk_af_ops = &ipv6_mapped; 1355 if (sk_is_mptcp(newsk)) 1371 struct sock *newsk; global() local [all...] |
| /linux/net/core/ |
| H A D | sock.c | 2479 struct sock *newsk; in sk_clone_lock() 2481 newsk = sk_prot_alloc(prot, priority, sk->sk_family); in sk_clone_lock() 2482 if (!newsk) in sk_clone_lock() 2485 sock_copy(newsk, sk); in sk_clone_lock() 2487 newsk->sk_prot_creator = prot; in sk_clone_lock() 2490 if (likely(newsk->sk_net_refcnt)) { in sk_clone_lock() 2491 get_net_track(sock_net(newsk), &newsk->ns_tracker, priority); in sk_clone_lock() 2492 sock_inuse_add(sock_net(newsk), 1); in sk_clone_lock() 2499 net_passive_inc(sock_net(newsk)); in sk_clone_lock() 2465 struct sock *newsk; sk_clone_lock() local [all...] |
| H A D | bpf_sk_storage.c | 133 bpf_sk_storage_clone_elem(struct sock *newsk, 139 copy_selem = bpf_selem_alloc(smap, newsk, NULL, false, GFP_ATOMIC); in bpf_sk_storage_clone_elem() 153 int bpf_sk_storage_clone(const struct sock *sk, struct sock *newsk) in bpf_sk_storage_clone_elem() 160 RCU_INIT_POINTER(newsk->sk_bpf_storage, NULL); in bpf_sk_storage_clone() 186 copy_selem = bpf_sk_storage_clone_elem(newsk, smap, selem); in bpf_sk_storage_clone() 197 ret = bpf_local_storage_alloc(newsk, smap, copy_selem, GFP_ATOMIC); in bpf_sk_storage_clone() 201 &newsk->sk_omem_alloc); in bpf_sk_storage_clone() 135 bpf_sk_storage_clone_elem(struct sock * newsk,struct bpf_local_storage_map * smap,struct bpf_local_storage_elem * selem) bpf_sk_storage_clone_elem() argument 155 bpf_sk_storage_clone(const struct sock * sk,struct sock * newsk) bpf_sk_storage_clone() argument
|
| /linux/tools/testing/selftests/bpf/progs/ |
| H A D | lsm_cgroup.c | 167 int BPF_PROG(socket_clone, struct sock *newsk, const struct request_sock *req) in BPF_PROG() argument 171 if (!newsk) in BPF_PROG() 175 if (bpf_setsockopt(newsk, SOL_SOCKET, SO_PRIORITY, &prio, sizeof(prio))) in BPF_PROG() 180 if (bpf_getsockopt(newsk, SOL_SOCKET, SO_PRIORITY, &prio, sizeof(prio))) in BPF_PROG()
|
| H A D | lsm_cgroup_nonvoid.c | 10 int BPF_PROG(nonvoid_socket_clone, struct sock *newsk, const struct request_sock *req) in BPF_PROG() argument
|
| /linux/net/sctp/ |
| H A D | ipv6.c | 490 static void sctp_v6_copy_ip_options(struct sock *sk, struct sock *newsk) in sctp_v6_copy_ip_options() argument 495 inet_sk(newsk)->inet_opt = NULL; in sctp_v6_copy_ip_options() 497 newnp = inet6_sk(newsk); in sctp_v6_copy_ip_options() 502 opt = ipv6_dup_options(newsk, opt); in sctp_v6_copy_ip_options() 785 struct sock *newsk; sctp_v6_create_accept_sk() local
|
| /linux/net/tipc/ |
| H A D | topsrv.c | 460 struct sock *newsk; in tipc_topsrv_accept() local 482 newsk = newsock->sk; in tipc_topsrv_accept() 483 write_lock_bh(&newsk->sk_callback_lock); in tipc_topsrv_accept() 484 newsk->sk_data_ready = tipc_conn_data_ready; in tipc_topsrv_accept() 485 newsk->sk_write_space = tipc_conn_write_space; in tipc_topsrv_accept() 486 newsk->sk_user_data = con; in tipc_topsrv_accept() 487 write_unlock_bh(&newsk->sk_callback_lock); in tipc_topsrv_accept() 490 newsk->sk_data_ready(newsk); in tipc_topsrv_accept()
|
| /linux/include/net/ |
| H A D | bpf_sk_storage.h | 32 int bpf_sk_storage_clone(const struct sock *sk, struct sock *newsk); 42 struct sock *newsk) in bpf_sk_storage_clone() argument
|
| H A D | inet_common.h | 34 struct sock *newsk);
|
| /linux/security/selinux/include/ |
| H A D | netlabel.h | 42 void selinux_netlbl_sctp_sk_clone(struct sock *sk, struct sock *newsk); 106 struct sock *newsk) in selinux_netlbl_sctp_sk_clone() argument
|
| /linux/net/llc/ |
| H A D | llc_conn.c | 764 struct sock *newsk = llc_sk_alloc(sock_net(sk), sk->sk_family, GFP_ATOMIC, in llc_create_incoming_sock() local 768 if (!newsk) in llc_create_incoming_sock() 770 newllc = llc_sk(newsk); in llc_create_incoming_sock() 775 llc_sap_add_socket(llc->sap, newsk); in llc_create_incoming_sock() 778 return newsk; in llc_create_incoming_sock() 805 struct sock *newsk = llc_create_incoming_sock(sk, skb->dev, in llc_conn_handler() local 807 if (!newsk) in llc_conn_handler() 809 skb_set_owner_r(skb, newsk); in llc_conn_handler()
|
| H A D | af_llc.c | 699 struct sock *sk = sock->sk, *newsk; in llc_ui_accept() local 726 newsk = skb->sk; in llc_ui_accept() 728 llc_ui_sk_init(newsock, newsk); in llc_ui_accept() 729 sock_reset_flag(newsk, SOCK_ZAPPED); in llc_ui_accept() 730 newsk->sk_state = TCP_ESTABLISHED; in llc_ui_accept() 733 newllc = llc_sk(newsk); in llc_ui_accept()
|
| /linux/net/mptcp/ |
| H A D | protocol.c | 3440 static void mptcp_copy_ip6_options(struct sock *newsk, const struct sock *sk) in mptcp_copy_ip6_options() argument 3446 newnp = inet6_sk(newsk); in mptcp_copy_ip6_options() 3451 opt = ipv6_dup_options(newsk, opt); in mptcp_copy_ip6_options() 3460 static void mptcp_copy_ip_options(struct sock *newsk, const struct sock *sk) in mptcp_copy_ip_options() argument 3466 newinet = inet_sk(newsk); in mptcp_copy_ip_options() 3471 newopt = sock_kmemdup(newsk, inet_opt, sizeof(*inet_opt) + in mptcp_copy_ip_options() 4176 struct sock *ssk, *newsk; in mptcp_stream_accept() local 4188 newsk = inet_csk_accept(ssk, arg); in mptcp_stream_accept() 4189 if (!newsk) in mptcp_stream_accept() 4192 pr_debug("newsk=%p, subflow is mptcp=%d\n", newsk, sk_is_mptcp(newsk)); in mptcp_stream_accept() [all …]
|
| H A D | pm_kernel.c | 835 struct sock *newsk, *ssk; in mptcp_pm_nl_create_listen_socket() local 844 newsk = entry->lsk->sk; in mptcp_pm_nl_create_listen_socket() 845 if (!newsk) in mptcp_pm_nl_create_listen_socket() 854 sock_lock_init_class_and_name(newsk, in mptcp_pm_nl_create_listen_socket() 860 lock_sock(newsk); in mptcp_pm_nl_create_listen_socket() 861 ssk = __mptcp_nmpc_sk(mptcp_sk(newsk)); in mptcp_pm_nl_create_listen_socket() 862 release_sock(newsk); in mptcp_pm_nl_create_listen_socket() 885 inet_sk_state_store(newsk, TCP_LISTEN); in mptcp_pm_nl_create_listen_socket()
|
| /linux/Documentation/translations/zh_CN/security/ |
| H A D | SCTP.rst | 115 @newsk - 指向新的套接字结构的指针。 254 @newsk - 指向新sock结构的指针。
|
| /linux/include/linux/ |
| H A D | skbuff.h | 2321 static inline void __skb_insert(struct sk_buff *newsk, in __skb_insert() argument 2328 WRITE_ONCE(newsk->next, next); in __skb_insert() 2329 WRITE_ONCE(newsk->prev, prev); in __skb_insert() 2330 WRITE_ONCE(((struct sk_buff_list *)next)->prev, newsk); in __skb_insert() 2331 WRITE_ONCE(((struct sk_buff_list *)prev)->next, newsk); in __skb_insert() 2425 struct sk_buff *newsk) in __skb_queue_after() argument 2427 __skb_insert(newsk, prev, ((struct sk_buff_list *)prev)->next, list); in __skb_queue_after() 2430 void skb_append(struct sk_buff *old, struct sk_buff *newsk, 2435 struct sk_buff *newsk) in __skb_queue_before() argument 2437 __skb_insert(newsk, ((struct sk_buff_list *)next)->prev, next, list); in __skb_queue_before() [all …]
|
| H A D | security.h | 1642 int security_unix_stream_connect(struct sock *sock, struct sock *other, struct sock *newsk); 1666 void security_sk_clone(const struct sock *sk, struct sock *newsk); 1674 void security_inet_csk_clone(struct sock *newsk, 1691 struct sock *newsk); 1704 struct sock *newsk) in security_unix_stream_connect() argument 1827 static inline void security_sk_clone(const struct sock *sk, struct sock *newsk) in security_sk_clone() argument 1851 static inline void security_inet_csk_clone(struct sock *newsk, in security_inet_csk_clone() argument 1918 struct sock *newsk) in security_sctp_sk_clone() argument
|
| H A D | lsm_hook_defs.h | 322 struct sock *newsk) 351 struct sock *newsk) 356 LSM_HOOK(void, LSM_RET_VOID, inet_csk_clone, struct sock *newsk, 375 struct sock *sk, struct sock *newsk)
|
| /linux/net/unix/ |
| H A D | af_unix.c | 1628 struct sock *sk = sock->sk, *newsk = NULL, *other = NULL; in unix_stream_connect() local 1659 newsk = unix_create1(net, NULL, 0, sock->type); in unix_stream_connect() 1660 if (IS_ERR(newsk)) { in unix_stream_connect() 1661 err = PTR_ERR(newsk); in unix_stream_connect() 1670 skb = sock_wmalloc(newsk, 1, 0, GFP_KERNEL); in unix_stream_connect() 1732 err = security_unix_stream_connect(sk, other, newsk); in unix_stream_connect() 1741 unix_peer(newsk) = sk; in unix_stream_connect() 1742 newsk->sk_state = TCP_ESTABLISHED; in unix_stream_connect() 1743 newsk->sk_type = sk->sk_type; in unix_stream_connect() 1744 newsk->sk_scm_recv_flags = other->sk_scm_recv_flags; in unix_stream_connect() [all …]
|
| /linux/security/selinux/ |
| H A D | netlabel.c | 377 void selinux_netlbl_sctp_sk_clone(struct sock *sk, struct sock *newsk) in selinux_netlbl_sctp_sk_clone() argument 380 struct sk_security_struct *newsksec = selinux_sock(newsk); in selinux_netlbl_sctp_sk_clone()
|
| /linux/net/ipv4/ |
| H A D | tcp_ao.c | 1189 int tcp_ao_copy_all_matching(const struct sock *sk, struct sock *newsk, in tcp_ao_copy_all_matching() argument 1217 addr = (union tcp_ao_addr *)&newsk->sk_daddr; in tcp_ao_copy_all_matching() 1220 addr = (union tcp_ao_addr *)&newsk->sk_v6_daddr; in tcp_ao_copy_all_matching() 1226 l3index = l3mdev_master_ifindex_by_index(sock_net(newsk), in tcp_ao_copy_all_matching() 1227 newsk->sk_bound_dev_if); in tcp_ao_copy_all_matching() 1233 new_key = tcp_ao_copy_key(newsk, key); in tcp_ao_copy_all_matching() 1237 tcp_ao_cache_traffic_keys(newsk, new_ao, new_key); in tcp_ao_copy_all_matching() 1274 sk_gso_disable(newsk); in tcp_ao_copy_all_matching() 1275 rcu_assign_pointer(tcp_sk(newsk)->ao_info, new_ao); in tcp_ao_copy_all_matching() 1283 atomic_sub(tcp_ao_sizeof_key(key), &newsk->sk_omem_alloc); in tcp_ao_copy_all_matching()
|
| /linux/security/ |
| H A D | security.c | 4044 struct sock *newsk) in security_unix_stream_connect() argument 4046 return call_int_hook(unix_stream_connect, sock, other, newsk); in security_unix_stream_connect() 4421 void security_sk_clone(const struct sock *sk, struct sock *newsk) in security_sk_clone() argument 4423 call_void_hook(sk_clone_security, sk, newsk); in security_sk_clone() 4492 void security_inet_csk_clone(struct sock *newsk, in security_inet_csk_clone() argument 4495 call_void_hook(inet_csk_clone, newsk, req); in security_inet_csk_clone() 4692 struct sock *newsk) in security_sctp_sk_clone() argument 4694 call_void_hook(sctp_sk_clone, asoc, sk, newsk); in security_sctp_sk_clone()
|