Home
last modified time | relevance | path

Searched refs:inet_opt (Results 1 – 18 of 18) sorted by relevance

/net/ipv4/
Ddatagram.c103 const struct ip_options_rcu *inet_opt; in ip4_datagram_release_cb() local
116 inet_opt = rcu_dereference(inet->inet_opt); in ip4_datagram_release_cb()
117 if (inet_opt && inet_opt->opt.srr) in ip4_datagram_release_cb()
118 daddr = inet_opt->opt.faddr; in ip4_datagram_release_cb()
Dip_output.c461 struct ip_options_rcu *inet_opt; in __ip_queue_xmit() local
471 inet_opt = rcu_dereference(inet->inet_opt); in __ip_queue_xmit()
484 if (inet_opt && inet_opt->opt.srr) in __ip_queue_xmit()
485 daddr = inet_opt->opt.faddr; in __ip_queue_xmit()
505 if (inet_opt && inet_opt->opt.is_strictroute && rt->rt_uses_gateway) in __ip_queue_xmit()
509 skb_push(skb, sizeof(struct iphdr) + (inet_opt ? inet_opt->opt.optlen : 0)); in __ip_queue_xmit()
523 if (inet_opt && inet_opt->opt.optlen) { in __ip_queue_xmit()
524 iph->ihl += inet_opt->opt.optlen >> 2; in __ip_queue_xmit()
525 ip_options_build(skb, &inet_opt->opt, inet->inet_daddr, rt); in __ip_queue_xmit()
Daf_inet.c158 kfree(rcu_dereference_protected(inet->inet_opt, 1)); in inet_sock_destruct()
1268 struct ip_options_rcu *inet_opt; in inet_sk_reselect_saddr() local
1271 inet_opt = rcu_dereference_protected(inet->inet_opt, in inet_sk_reselect_saddr()
1273 if (inet_opt && inet_opt->opt.srr) in inet_sk_reselect_saddr()
1274 daddr = inet_opt->opt.faddr; in inet_sk_reselect_saddr()
1320 struct ip_options_rcu *inet_opt; in inet_sk_rebuild_header() local
1330 inet_opt = rcu_dereference(inet->inet_opt); in inet_sk_rebuild_header()
1332 if (inet_opt && inet_opt->opt.srr) in inet_sk_rebuild_header()
1333 daddr = inet_opt->opt.faddr; in inet_sk_rebuild_header()
Draw.c552 struct ip_options_rcu *inet_opt; in raw_sendmsg() local
555 inet_opt = rcu_dereference(inet->inet_opt); in raw_sendmsg()
556 if (inet_opt) { in raw_sendmsg()
557 memcpy(&opt_copy, inet_opt, in raw_sendmsg()
558 sizeof(*inet_opt) + inet_opt->opt.optlen); in raw_sendmsg()
Dping.c749 struct ip_options_rcu *inet_opt; in ping_v4_sendmsg() local
752 inet_opt = rcu_dereference(inet->inet_opt); in ping_v4_sendmsg()
753 if (inet_opt) { in ping_v4_sendmsg()
754 memcpy(&opt_copy, inet_opt, in ping_v4_sendmsg()
755 sizeof(*inet_opt) + inet_opt->opt.optlen); in ping_v4_sendmsg()
Dtcp_ipv4.c216 struct ip_options_rcu *inet_opt; in tcp_v4_connect() local
233 inet_opt = rcu_dereference_protected(inet->inet_opt, in tcp_v4_connect()
235 if (inet_opt && inet_opt->opt.srr) { in tcp_v4_connect()
238 nexthop = inet_opt->opt.faddr; in tcp_v4_connect()
259 if (!inet_opt || !inet_opt->opt.srr) in tcp_v4_connect()
286 if (inet_opt) in tcp_v4_connect()
287 inet_csk(sk)->icsk_ext_hdr_len = inet_opt->opt.optlen; in tcp_v4_connect()
1578 struct ip_options_rcu *inet_opt; in tcp_v4_syn_recv_sock() local
1597 inet_opt = rcu_dereference(ireq->ireq_opt); in tcp_v4_syn_recv_sock()
1598 RCU_INIT_POINTER(newinet->inet_opt, inet_opt); in tcp_v4_syn_recv_sock()
[all …]
Dip_sockglue.c1059 old = rcu_dereference_protected(inet->inet_opt, in do_ip_setsockopt()
1078 rcu_assign_pointer(inet->inet_opt, opt); in do_ip_setsockopt()
1608 struct ip_options_rcu *inet_opt; in do_ip_getsockopt() local
1610 inet_opt = rcu_dereference_protected(inet->inet_opt, in do_ip_getsockopt()
1613 if (inet_opt) in do_ip_getsockopt()
1614 memcpy(optbuf, &inet_opt->opt, in do_ip_getsockopt()
1616 inet_opt->opt.optlen); in do_ip_getsockopt()
Dinet_connection_sock.c1489 const struct ip_options_rcu *inet_opt; in inet_csk_rebuild_route() local
1495 inet_opt = rcu_dereference(inet->inet_opt); in inet_csk_rebuild_route()
1496 if (inet_opt && inet_opt->opt.srr) in inet_csk_rebuild_route()
1497 daddr = inet_opt->opt.faddr; in inet_csk_rebuild_route()
Dcipso_ipv4.c1882 old = rcu_dereference_protected(sk_inet->inet_opt, in cipso_v4_sock_setattr()
1891 rcu_assign_pointer(sk_inet->inet_opt, opt); in cipso_v4_sock_setattr()
2057 hdr_delta = cipso_v4_delopt(&sk_inet->inet_opt); in cipso_v4_sock_delattr()
2146 opt = rcu_dereference(inet_sk(sk)->inet_opt); in cipso_v4_sock_getattr()
Dudp.c1161 struct ip_options_rcu *inet_opt; in udp_sendmsg() local
1164 inet_opt = rcu_dereference(inet->inet_opt); in udp_sendmsg()
1165 if (inet_opt) { in udp_sendmsg()
1166 memcpy(&opt_copy, inet_opt, in udp_sendmsg()
1167 sizeof(*inet_opt) + inet_opt->opt.optlen); in udp_sendmsg()
Droute.c548 const struct ip_options_rcu *inet_opt; in build_sk_flow_key() local
552 inet_opt = rcu_dereference(inet->inet_opt); in build_sk_flow_key()
553 if (inet_opt && inet_opt->opt.srr) in build_sk_flow_key()
554 daddr = inet_opt->opt.faddr; in build_sk_flow_key()
/net/dccp/
Dipv4.c55 struct ip_options_rcu *inet_opt; in dccp_v4_connect() local
67 inet_opt = rcu_dereference_protected(inet->inet_opt, in dccp_v4_connect()
69 if (inet_opt != NULL && inet_opt->opt.srr) { in dccp_v4_connect()
72 nexthop = inet_opt->opt.faddr; in dccp_v4_connect()
89 if (inet_opt == NULL || !inet_opt->opt.srr) in dccp_v4_connect()
106 if (inet_opt) in dccp_v4_connect()
107 inet_csk(sk)->icsk_ext_hdr_len = inet_opt->opt.optlen; in dccp_v4_connect()
430 RCU_INIT_POINTER(newinet->inet_opt, rcu_dereference(ireq->ireq_opt)); in dccp_v4_request_recv_sock()
448 newinet->inet_opt = NULL; in dccp_v4_request_recv_sock()
459 newinet->inet_opt = NULL; in dccp_v4_request_recv_sock()
Dipv6.c514 newinet->inet_opt = NULL; in dccp_v6_request_recv_sock()
/net/sctp/
Dprotocol.c179 struct ip_options_rcu *inet_opt, *newopt = NULL; in sctp_v4_copy_ip_options() local
184 inet_opt = rcu_dereference(inet->inet_opt); in sctp_v4_copy_ip_options()
185 if (inet_opt) { in sctp_v4_copy_ip_options()
186 newopt = sock_kmalloc(newsk, sizeof(*inet_opt) + in sctp_v4_copy_ip_options()
187 inet_opt->opt.optlen, GFP_ATOMIC); in sctp_v4_copy_ip_options()
189 memcpy(newopt, inet_opt, sizeof(*inet_opt) + in sctp_v4_copy_ip_options()
190 inet_opt->opt.optlen); in sctp_v4_copy_ip_options()
194 RCU_INIT_POINTER(newinet->inet_opt, newopt); in sctp_v4_copy_ip_options()
202 struct ip_options_rcu *inet_opt; in sctp_v4_ip_options_len() local
206 inet_opt = rcu_dereference(inet->inet_opt); in sctp_v4_ip_options_len()
[all …]
/net/l2tp/
Dl2tp_ip.c466 const struct ip_options_rcu *inet_opt; in l2tp_ip_sendmsg() local
468 inet_opt = rcu_dereference(inet->inet_opt); in l2tp_ip_sendmsg()
471 if (inet_opt && inet_opt->opt.srr) in l2tp_ip_sendmsg()
472 daddr = inet_opt->opt.faddr; in l2tp_ip_sendmsg()
/net/mptcp/
Dprotocol.c3202 struct ip_options_rcu *inet_opt, *newopt = NULL; in mptcp_copy_ip_options() local
3209 inet_opt = rcu_dereference(inet->inet_opt); in mptcp_copy_ip_options()
3210 if (inet_opt) { in mptcp_copy_ip_options()
3211 newopt = sock_kmalloc(newsk, sizeof(*inet_opt) + in mptcp_copy_ip_options()
3212 inet_opt->opt.optlen, GFP_ATOMIC); in mptcp_copy_ip_options()
3214 memcpy(newopt, inet_opt, sizeof(*inet_opt) + in mptcp_copy_ip_options()
3215 inet_opt->opt.optlen); in mptcp_copy_ip_options()
3219 RCU_INIT_POINTER(newinet->inet_opt, newopt); in mptcp_copy_ip_options()
/net/ipv6/
Dtcp_ipv6.c1310 newinet->inet_opt = NULL; in tcp_v6_syn_recv_sock()
/net/
Dsocket.c3680 opt = rcu_dereference_protected(inet->inet_opt, in kernel_sock_ip_overhead()