Home
last modified time | relevance | path

Searched refs:ipv4 (Results 1 – 25 of 80) sorted by relevance

1234

/net/ipv4/
Dsysctl_net_ipv4.c65 write_seqlock_bh(&net->ipv4.ip_local_ports.lock); in set_local_port_range()
66 if (same_parity && !net->ipv4.ip_local_ports.warned) { in set_local_port_range()
67 net->ipv4.ip_local_ports.warned = true; in set_local_port_range()
70 net->ipv4.ip_local_ports.range[0] = range[0]; in set_local_port_range()
71 net->ipv4.ip_local_ports.range[1] = range[1]; in set_local_port_range()
72 write_sequnlock_bh(&net->ipv4.ip_local_ports.lock); in set_local_port_range()
80 container_of(table->data, struct net, ipv4.ip_local_ports.range); in ipv4_local_port_range()
101 (range[0] < READ_ONCE(net->ipv4.sysctl_ip_prot_sock))) in ipv4_local_port_range()
115 ipv4.sysctl_ip_prot_sock); in ipv4_privileged_ports()
127 pports = READ_ONCE(net->ipv4.sysctl_ip_prot_sock); in ipv4_privileged_ports()
[all …]
Dtcp_ipv4.c109 int reuse = READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_tw_reuse); in tcp_twsk_unique()
209 struct inet_timewait_death_row *tcp_death_row = &sock_net(sk)->ipv4.tcp_death_row; in tcp_v4_connect()
812 ctl_sk = this_cpu_read(*net->ipv4.tcp_sk); in tcp_v4_send_reset()
914 ctl_sk = this_cpu_read(*net->ipv4.tcp_sk); in tcp_v4_send_ack()
1007 tos = READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_reflect_tos) ? in tcp_v4_send_synack()
1593 if (READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_reflect_tos)) in tcp_v4_syn_recv_sock()
3107 .sysctl_wmem_offset = offsetof(struct net, ipv4.sysctl_tcp_wmem),
3108 .sysctl_rmem_offset = offsetof(struct net, ipv4.sysctl_tcp_rmem),
3124 if (net->ipv4.tcp_congestion_control) in tcp_sk_exit()
3125 bpf_module_put(net->ipv4.tcp_congestion_control, in tcp_sk_exit()
[all …]
Dfib_rules.c92 err = fib_rules_lookup(net->ipv4.rules_ops, flowi4_to_flowi(flp), 0, &arg); in __fib_lookup()
267 atomic_inc(&net->ipv4.fib_num_tclassid_users); in fib4_rule_configure()
272 net->ipv4.fib_rules_require_fldissect++; in fib4_rule_configure()
280 net->ipv4.fib_has_custom_rules = true; in fib4_rule_configure()
299 atomic_dec(&net->ipv4.fib_num_tclassid_users); in fib4_rule_delete()
301 net->ipv4.fib_has_custom_rules = true; in fib4_rule_delete()
303 if (net->ipv4.fib_rules_require_fldissect && in fib4_rule_delete()
305 net->ipv4.fib_rules_require_fldissect--; in fib4_rule_delete()
421 net->ipv4.rules_ops = ops; in fib4_rules_init()
422 net->ipv4.fib_has_custom_rules = false; in fib4_rules_init()
[all …]
Dip_fragment.c92 inet_getpeer_v4(net->ipv4.peers, key->saddr, key->vif, 1) : in ip4_frag_init()
217 q = inet_frag_find(net->ipv4.fqdir, &key); in ip_find()
603 table[0].data = &net->ipv4.fqdir->high_thresh; in ip4_frags_ns_ctl_register()
604 table[0].extra1 = &net->ipv4.fqdir->low_thresh; in ip4_frags_ns_ctl_register()
605 table[1].data = &net->ipv4.fqdir->low_thresh; in ip4_frags_ns_ctl_register()
606 table[1].extra2 = &net->ipv4.fqdir->high_thresh; in ip4_frags_ns_ctl_register()
607 table[2].data = &net->ipv4.fqdir->timeout; in ip4_frags_ns_ctl_register()
608 table[3].data = &net->ipv4.fqdir->max_dist; in ip4_frags_ns_ctl_register()
614 net->ipv4.frags_hdr = hdr; in ip4_frags_ns_ctl_register()
628 table = net->ipv4.frags_hdr->ctl_table_arg; in ip4_frags_ns_ctl_unregister()
[all …]
Dtcp_fastopen.c19 ctxt = rcu_dereference(net->ipv4.tcp_fastopen_ctx); in tcp_fastopen_init_key_once()
58 ctxt = xchg((__force struct tcp_fastopen_context **)&net->ipv4.tcp_fastopen_ctx, NULL); in tcp_fastopen_ctx_destroy()
91 octx = xchg((__force struct tcp_fastopen_context **)&net->ipv4.tcp_fastopen_ctx, ctx); in tcp_fastopen_reset_cipher()
110 ctx = rcu_dereference(net->ipv4.tcp_fastopen_ctx); in tcp_fastopen_get_cipher()
343 return (READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_fastopen) & flag) || in tcp_fastopen_no_cookie()
358 int tcp_fastopen = READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_fastopen); in tcp_try_fastopen()
500 if (!READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_fastopen_blackhole_timeout)) in tcp_fastopen_active_disable()
504 WRITE_ONCE(net->ipv4.tfo_active_disable_stamp, jiffies); in tcp_fastopen_active_disable()
510 atomic_inc(&net->ipv4.tfo_active_disable_times); in tcp_fastopen_active_disable()
522 READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_fastopen_blackhole_timeout); in tcp_fastopen_active_should_disable()
[all …]
Dfib_notifier.c26 net->ipv4.fib_seq++; in call_fib4_notifiers()
34 return net->ipv4.fib_seq + fib4_rules_seq_read(net); in fib4_seq_read()
60 net->ipv4.fib_seq = 0; in fib4_notifier_init()
65 net->ipv4.notifier_ops = ops; in fib4_notifier_init()
72 fib_notifier_ops_unregister(net->ipv4.notifier_ops); in fib4_notifier_exit()
Dfib_frontend.c64 &net->ipv4.fib_table_hash[TABLE_LOCAL_INDEX]); in fib4_rules_init()
66 &net->ipv4.fib_table_hash[TABLE_MAIN_INDEX]); in fib4_rules_init()
86 if (id == RT_TABLE_LOCAL && !net->ipv4.fib_has_custom_rules) in fib_new_table()
95 rcu_assign_pointer(net->ipv4.fib_main, tb); in fib_new_table()
98 rcu_assign_pointer(net->ipv4.fib_default, tb); in fib_new_table()
105 hlist_add_head_rcu(&tb->tb_hlist, &net->ipv4.fib_table_hash[h]); in fib_new_table()
121 head = &net->ipv4.fib_table_hash[h]; in fib_get_table()
137 rcu_assign_pointer(net->ipv4.fib_main, new); in fib_replace_table()
140 rcu_assign_pointer(net->ipv4.fib_default, new); in fib_replace_table()
189 struct hlist_head *head = &net->ipv4.fib_table_hash[h]; in fib_flush()
[all …]
Dicmp.c204 return this_cpu_read(*net->ipv4.icmp_sk); in icmp_sk()
293 if (!((1 << type) & READ_ONCE(net->ipv4.sysctl_icmp_ratemask))) in icmpv4_mask_allow()
330 peer = inet_getpeer_v4(net->ipv4.peers, fl4->daddr, vif, 1); in icmpv4_xrlim_allow()
332 READ_ONCE(net->ipv4.sysctl_icmp_ratelimit)); in icmpv4_xrlim_allow()
706 READ_ONCE(net->ipv4.sysctl_icmp_errors_use_inbound_ifaddr)) in __icmp_send()
895 switch (READ_ONCE(net->ipv4.sysctl_ip_no_pmtu_disc)) { in icmp_unreach()
948 if (!READ_ONCE(net->ipv4.sysctl_icmp_ignore_bogus_error_responses) && in icmp_unreach()
1008 if (net->ipv4.sysctl_icmp_echo_ignore_all) in icmp_echo()
1043 if (!READ_ONCE(net->ipv4.sysctl_icmp_echo_enable_probe)) in icmp_build_probe()
1257 net->ipv4.sysctl_icmp_echo_ignore_broadcasts) { in icmp_rcv()
[all …]
Dtcp_timer.c146 int retries = READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_orphan_retries); /* May be zero. */ in tcp_orphan_retries()
166 if (!READ_ONCE(net->ipv4.sysctl_tcp_mtu_probing)) in tcp_mtu_probing()
174 mss = min(READ_ONCE(net->ipv4.sysctl_tcp_base_mss), mss); in tcp_mtu_probing()
175 mss = max(mss, READ_ONCE(net->ipv4.sysctl_tcp_mtu_probe_floor)); in tcp_mtu_probing()
176 mss = max(mss, READ_ONCE(net->ipv4.sysctl_tcp_min_snd_mss)); in tcp_mtu_probing()
243 READ_ONCE(net->ipv4.sysctl_tcp_syn_retries); in tcp_write_timeout()
246 if (retransmits_timed_out(sk, READ_ONCE(net->ipv4.sysctl_tcp_retries1), 0)) { in tcp_write_timeout()
253 retry_until = READ_ONCE(net->ipv4.sysctl_tcp_retries2); in tcp_write_timeout()
384 max_probes = READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_retries2); in tcp_probe_timer()
417 READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_synack_retries) + 1; in tcp_fastopen_synack_timer()
[all …]
Daf_inet.c223 tcp_fastopen = READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_fastopen); in inet_listen()
344 if (READ_ONCE(net->ipv4.sysctl_ip_no_pmtu_disc)) in inet_create()
1261 if (READ_ONCE(sock_net(sk)->ipv4.sysctl_ip_dynaddr) > 1) { in inet_sk_reselect_saddr()
1316 if (!READ_ONCE(sock_net(sk)->ipv4.sysctl_ip_dynaddr) || in inet_sk_rebuild_header()
1842 seqlock_init(&net->ipv4.ip_local_ports.lock); in inet_init_net()
1843 net->ipv4.ip_local_ports.range[0] = 32768; in inet_init_net()
1844 net->ipv4.ip_local_ports.range[1] = 60999; in inet_init_net()
1846 seqlock_init(&net->ipv4.ping_group_range.lock); in inet_init_net()
1851 net->ipv4.ping_group_range.range[0] = make_kgid(&init_user_ns, 1); in inet_init_net()
1852 net->ipv4.ping_group_range.range[1] = make_kgid(&init_user_ns, 0); in inet_init_net()
[all …]
Ddevinet.c94 IPV4_DEVCONF((*net->ipv4.devconf_dflt), attr)
262 memcpy(&in_dev->cnf, dev_net(dev)->ipv4.devconf_dflt, in inetdev_init()
626 struct sock *sk = net->ipv4.mc_autojoin_sk; in ip_mc_autojoin_config()
1851 cb->seq = atomic_read(&tgt_net->ipv4.dev_addr_genid) ^ in inet_dump_ifaddr()
2184 devconf = net->ipv4.devconf_all; in inet_netconf_get_devconf()
2187 devconf = net->ipv4.devconf_dflt; in inet_netconf_get_devconf()
2253 cb->seq = atomic_read(&net->ipv4.dev_addr_genid) ^ in inet_netconf_dump_devconf()
2280 net->ipv4.devconf_all, in inet_netconf_dump_devconf()
2291 net->ipv4.devconf_dflt, in inet_netconf_dump_devconf()
2319 in_dev->cnf.data[i] = net->ipv4.devconf_dflt->data[i]; in devinet_copy_dflt_conf()
[all …]
Dxfrm4_policy.c189 net->ipv4.xfrm4_hdr = hdr; in xfrm4_net_sysctl_init()
203 if (!net->ipv4.xfrm4_hdr) in xfrm4_net_sysctl_exit()
206 table = net->ipv4.xfrm4_hdr->ctl_table_arg; in xfrm4_net_sysctl_exit()
207 unregister_net_sysctl_table(net->ipv4.xfrm4_hdr); in xfrm4_net_sysctl_exit()
Dipmr.c113 list_for_each_entry_rcu(mrt, &net->ipv4.mr_tables, list, \
115 list_empty(&net->ipv4.mr_tables))
123 ret = list_entry_rcu(net->ipv4.mr_tables.next, in ipmr_mr_table_iter()
129 if (&ret->list == &net->ipv4.mr_tables) in ipmr_mr_table_iter()
158 err = fib_rules_lookup(net->ipv4.mr_rules_ops, in ipmr_fib_lookup()
248 INIT_LIST_HEAD(&net->ipv4.mr_tables); in ipmr_rules_init()
260 net->ipv4.mr_rules_ops = ops; in ipmr_rules_init()
277 list_for_each_entry_safe(mrt, next, &net->ipv4.mr_tables, list) { in ipmr_rules_exit()
281 fib_rules_unregister(net->ipv4.mr_rules_ops); in ipmr_rules_exit()
303 for (mrt = net->ipv4.mrt; mrt; mrt = NULL)
[all …]
Dsyncookies.c246 if (!READ_ONCE(net->ipv4.sysctl_tcp_timestamps)) in cookie_timestamp_decode()
251 if (tcp_opt->sack_ok && !READ_ONCE(net->ipv4.sysctl_tcp_sack)) in cookie_timestamp_decode()
260 return READ_ONCE(net->ipv4.sysctl_tcp_window_scaling) != 0; in cookie_timestamp_decode()
272 if (READ_ONCE(net->ipv4.sysctl_tcp_ecn)) in cookie_ecn_ok()
338 if (!READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_syncookies) || in cookie_v4_check()
Digmp.c474 !READ_ONCE(net->ipv4.sysctl_igmp_llm_reports)) in add_grec()
600 !READ_ONCE(net->ipv4.sysctl_igmp_llm_reports)) in igmpv3_send_report()
744 !READ_ONCE(net->ipv4.sysctl_igmp_llm_reports)) in igmp_send_report()
833 WRITE_ONCE(in_dev->mr_ifc_count, in_dev->mr_qrv ?: READ_ONCE(net->ipv4.sysctl_igmp_qrv)); in igmp_ifc_event()
929 !READ_ONCE(net->ipv4.sysctl_igmp_llm_reports)) in igmp_heard_report()
1015 in_dev->mr_qrv = ih3->qrv ?: READ_ONCE(net->ipv4.sysctl_igmp_qrv); in igmp_heard_query()
1054 !READ_ONCE(net->ipv4.sysctl_igmp_llm_reports)) in igmp_heard_query()
1195 pmc->crcount = in_dev->mr_qrv ?: READ_ONCE(net->ipv4.sysctl_igmp_qrv); in igmpv3_add_delrec()
1247 READ_ONCE(net->ipv4.sysctl_igmp_qrv); in igmpv3_del_delrec()
1250 READ_ONCE(net->ipv4.sysctl_igmp_qrv); in igmpv3_del_delrec()
[all …]
Dudplite.c64 .sysctl_wmem_offset = offsetof(struct net, ipv4.sysctl_udp_wmem_min),
65 .sysctl_rmem_offset = offsetof(struct net, ipv4.sysctl_udp_rmem_min),
Droute.c496 if (unlikely(siphash_key_is_zero(&net->ipv4.ip_id_key))) in __ip_select_ident()
497 get_random_bytes(&net->ipv4.ip_id_key, in __ip_select_ident()
498 sizeof(net->ipv4.ip_id_key)); in __ip_select_ident()
503 &net->ipv4.ip_id_key); in __ip_select_ident()
901 peer = inet_getpeer_v4(net->ipv4.peers, ip_hdr(skb)->saddr, vif, 1); in ip_rt_send_redirect()
1001 peer = inet_getpeer_v4(net->ipv4.peers, ip_hdr(skb)->saddr, in ip_error()
1409 if (READ_ONCE(dev_net(dev)->ipv4.sysctl_ip_fwd_use_pmtu) || in ip_mtu_from_fib_result()
1587 rt->rt_gw4 = nhc->nhc_gw.ipv4; in rt_set_nexthop()
1831 gw = nhc->nhc_gw_family == AF_INET ? nhc->nhc_gw.ipv4 : 0; in __mkroute_input()
1934 u32 hash_fields = READ_ONCE(net->ipv4.sysctl_fib_multipath_hash_fields); in fib_multipath_custom_hash_outer()
[all …]
Dip_sockglue.c357 mutex_lock(&net->ipv4.ra_mutex); in ip_ra_control()
358 for (rap = &net->ipv4.ra_chain; in ip_ra_control()
360 lockdep_is_held(&net->ipv4.ra_mutex))) != NULL; in ip_ra_control()
364 mutex_unlock(&net->ipv4.ra_mutex); in ip_ra_control()
371 mutex_unlock(&net->ipv4.ra_mutex); in ip_ra_control()
386 mutex_unlock(&net->ipv4.ra_mutex); in ip_ra_control()
395 mutex_unlock(&net->ipv4.ra_mutex); in ip_ra_control()
792 gsf->gf_numsrc > READ_ONCE(sock_net(sk)->ipv4.sysctl_igmp_max_msf)) in ip_set_mcast_msfilter()
842 if (n > READ_ONCE(sock_net(sk)->ipv4.sysctl_igmp_max_msf)) in compat_ip_set_mcast_msfilter()
1252 msf->imsf_numsrc > READ_ONCE(net->ipv4.sysctl_igmp_max_msf)) { in do_ip_setsockopt()
[all …]
/net/core/
Dlwt_bpf.c180 bool ipv4; in bpf_lwt_xmit_reroute() local
183 ipv4 = true; in bpf_lwt_xmit_reroute()
185 ipv4 = false; in bpf_lwt_xmit_reroute()
198 if (ipv4) { in bpf_lwt_xmit_reroute()
534 static int handle_gso_encap(struct sk_buff *skb, bool ipv4, int encap_len) in handle_gso_encap() argument
547 if (ipv4) { in handle_gso_encap()
580 if (ipv4) in handle_gso_encap()
593 bool ipv4; in bpf_lwt_push_ip_encap() local
602 ipv4 = true; in bpf_lwt_push_ip_encap()
606 ipv4 = false; in bpf_lwt_push_ip_encap()
[all …]
/net/tipc/
Dudp_media.c77 struct in_addr ipv4; member
109 return ipv4_is_multicast(addr->ipv4.s_addr); in tipc_udp_is_mcast_addr()
135 snprintf(buf, size, "%pI4:%u", &ua->ipv4, ntohs(ua->port)); in tipc_udp_addr2str()
181 .daddr = dst->ipv4.s_addr, in tipc_udp_xmit()
182 .saddr = src->ipv4.s_addr, in tipc_udp_xmit()
195 udp_tunnel_xmit_skb(rt, ub->ubsock->sk, skb, src->ipv4.s_addr, in tipc_udp_xmit()
196 dst->ipv4.s_addr, 0, ttl, 0, src->port, in tipc_udp_xmit()
321 pr_info("New replicast peer: %pI4\n", &rcast->addr.ipv4); in tipc_udp_rcast_add()
346 src.ipv4.s_addr = iphdr->saddr; in tipc_udp_rcast_disc()
412 mreqn.imr_multiaddr = remote->ipv4; in enable_mcast()
[all …]
/net/openvswitch/
Dflow.c550 memset(&key->ipv4, 0, sizeof(key->ipv4)); in key_extract_l3l4()
559 key->ipv4.addr.src = nh->saddr; in key_extract_l3l4()
560 key->ipv4.addr.dst = nh->daddr; in key_extract_l3l4()
637 memcpy(&key->ipv4.addr.src, arp->ar_sip, sizeof(key->ipv4.addr.src)); in key_extract_l3l4()
638 memcpy(&key->ipv4.addr.dst, arp->ar_tip, sizeof(key->ipv4.addr.dst)); in key_extract_l3l4()
639 ether_addr_copy(key->ipv4.arp.sha, arp->ar_sha); in key_extract_l3l4()
640 ether_addr_copy(key->ipv4.arp.tha, arp->ar_tha); in key_extract_l3l4()
643 memset(&key->ipv4, 0, sizeof(key->ipv4)); in key_extract_l3l4()
Dflow_netlink.c660 bool ttl = false, ipv4 = false, ipv6 = false; in ip_tun_from_nlattr() local
691 SW_FLOW_KEY_PUT(match, tun_key.u.ipv4.src, in ip_tun_from_nlattr()
693 ipv4 = true; in ip_tun_from_nlattr()
696 SW_FLOW_KEY_PUT(match, tun_key.u.ipv4.dst, in ip_tun_from_nlattr()
698 ipv4 = true; in ip_tun_from_nlattr()
780 ipv4 = true; in ip_tun_from_nlattr()
802 if (ipv4 && ipv6) { in ip_tun_from_nlattr()
808 if (!ipv4 && !ipv6) { in ip_tun_from_nlattr()
812 if (ipv4) { in ip_tun_from_nlattr()
814 if (match->key->tun_key.u.ipv4.src || in ip_tun_from_nlattr()
[all …]
/net/psample/
Dpsample.c234 if (tun_key->u.ipv4.src && in __psample_ip_tun_to_nlattr()
236 tun_key->u.ipv4.src)) in __psample_ip_tun_to_nlattr()
238 if (tun_key->u.ipv4.dst && in __psample_ip_tun_to_nlattr()
240 tun_key->u.ipv4.dst)) in __psample_ip_tun_to_nlattr()
324 if (tun_key->u.ipv4.src) in psample_tunnel_meta_len()
326 if (tun_key->u.ipv4.dst) in psample_tunnel_meta_len()
/net/sctp/
Doffload.c111 goto ipv4; in sctp_offload_init()
116 ipv4: in sctp_offload_init()
/net/ipv6/
Dudplite.c60 .sysctl_wmem_offset = offsetof(struct net, ipv4.sysctl_udp_wmem_min),
61 .sysctl_rmem_offset = offsetof(struct net, ipv4.sysctl_udp_rmem_min),

1234