/net/ipv4/ |
D | sysctl_net_ipv4.c | 62 write_seqlock_bh(&net->ipv4.ip_local_ports.lock); in set_local_port_range() 63 if (same_parity && !net->ipv4.ip_local_ports.warned) { in set_local_port_range() 64 net->ipv4.ip_local_ports.warned = true; in set_local_port_range() 67 net->ipv4.ip_local_ports.range[0] = range[0]; in set_local_port_range() 68 net->ipv4.ip_local_ports.range[1] = range[1]; in set_local_port_range() 69 write_sequnlock_bh(&net->ipv4.ip_local_ports.lock); in set_local_port_range() 78 container_of(table->data, struct net, ipv4.ip_local_ports.range); in ipv4_local_port_range() 99 (range[0] < net->ipv4.sysctl_ip_prot_sock)) in ipv4_local_port_range() 113 ipv4.sysctl_ip_prot_sock); in ipv4_privileged_ports() 125 pports = net->ipv4.sysctl_ip_prot_sock; in ipv4_privileged_ports() [all …]
|
D | tcp_fastopen.c | 19 ctxt = rcu_dereference(net->ipv4.tcp_fastopen_ctx); in tcp_fastopen_init_key_once() 58 spin_lock(&net->ipv4.tcp_fastopen_ctx_lock); in tcp_fastopen_ctx_destroy() 60 ctxt = rcu_dereference_protected(net->ipv4.tcp_fastopen_ctx, in tcp_fastopen_ctx_destroy() 61 lockdep_is_held(&net->ipv4.tcp_fastopen_ctx_lock)); in tcp_fastopen_ctx_destroy() 62 rcu_assign_pointer(net->ipv4.tcp_fastopen_ctx, NULL); in tcp_fastopen_ctx_destroy() 63 spin_unlock(&net->ipv4.tcp_fastopen_ctx_lock); in tcp_fastopen_ctx_destroy() 92 spin_lock(&net->ipv4.tcp_fastopen_ctx_lock); in tcp_fastopen_reset_cipher() 96 lockdep_is_held(&net->ipv4.tcp_fastopen_ctx_lock)); in tcp_fastopen_reset_cipher() 99 octx = rcu_dereference_protected(net->ipv4.tcp_fastopen_ctx, in tcp_fastopen_reset_cipher() 100 lockdep_is_held(&net->ipv4.tcp_fastopen_ctx_lock)); in tcp_fastopen_reset_cipher() [all …]
|
D | tcp_ipv4.c | 111 int reuse = sock_net(sk)->ipv4.sysctl_tcp_tw_reuse; in tcp_twsk_unique() 210 struct inet_timewait_death_row *tcp_death_row = &sock_net(sk)->ipv4.tcp_death_row; in tcp_v4_connect() 773 ctl_sk = this_cpu_read(*net->ipv4.tcp_sk); in tcp_v4_send_reset() 871 ctl_sk = this_cpu_read(*net->ipv4.tcp_sk); in tcp_v4_send_ack() 2603 .sysctl_wmem_offset = offsetof(struct net, ipv4.sysctl_tcp_wmem), 2604 .sysctl_rmem_offset = offsetof(struct net, ipv4.sysctl_tcp_rmem), 2624 if (net->ipv4.tcp_congestion_control) in tcp_sk_exit() 2625 module_put(net->ipv4.tcp_congestion_control->owner); in tcp_sk_exit() 2628 inet_ctl_sock_destroy(*per_cpu_ptr(net->ipv4.tcp_sk, cpu)); in tcp_sk_exit() 2629 free_percpu(net->ipv4.tcp_sk); in tcp_sk_exit() [all …]
|
D | fib_rules.c | 90 err = fib_rules_lookup(net->ipv4.rules_ops, flowi4_to_flowi(flp), 0, &arg); in __fib_lookup() 261 net->ipv4.fib_num_tclassid_users++; in fib4_rule_configure() 266 net->ipv4.fib_rules_require_fldissect++; in fib4_rule_configure() 274 net->ipv4.fib_has_custom_rules = true; in fib4_rule_configure() 293 net->ipv4.fib_num_tclassid_users--; in fib4_rule_delete() 295 net->ipv4.fib_has_custom_rules = true; in fib4_rule_delete() 297 if (net->ipv4.fib_rules_require_fldissect && in fib4_rule_delete() 299 net->ipv4.fib_rules_require_fldissect--; in fib4_rule_delete() 415 net->ipv4.rules_ops = ops; in fib4_rules_init() 416 net->ipv4.fib_has_custom_rules = false; in fib4_rules_init() [all …]
|
D | ip_fragment.c | 92 inet_getpeer_v4(net->ipv4.peers, key->saddr, key->vif, 1) : in ip4_frag_init() 216 q = inet_frag_find(net->ipv4.fqdir, &key); in ip_find() 602 table[0].data = &net->ipv4.fqdir->high_thresh; in ip4_frags_ns_ctl_register() 603 table[0].extra1 = &net->ipv4.fqdir->low_thresh; in ip4_frags_ns_ctl_register() 604 table[1].data = &net->ipv4.fqdir->low_thresh; in ip4_frags_ns_ctl_register() 605 table[1].extra2 = &net->ipv4.fqdir->high_thresh; in ip4_frags_ns_ctl_register() 606 table[2].data = &net->ipv4.fqdir->timeout; in ip4_frags_ns_ctl_register() 607 table[3].data = &net->ipv4.fqdir->max_dist; in ip4_frags_ns_ctl_register() 613 net->ipv4.frags_hdr = hdr; in ip4_frags_ns_ctl_register() 627 table = net->ipv4.frags_hdr->ctl_table_arg; in ip4_frags_ns_ctl_unregister() [all …]
|
D | fib_notifier.c | 26 net->ipv4.fib_seq++; in call_fib4_notifiers() 34 return net->ipv4.fib_seq + fib4_rules_seq_read(net); in fib4_seq_read() 61 net->ipv4.fib_seq = 0; in fib4_notifier_init() 66 net->ipv4.notifier_ops = ops; in fib4_notifier_init() 73 fib_notifier_ops_unregister(net->ipv4.notifier_ops); in fib4_notifier_exit()
|
D | icmp.c | 204 return this_cpu_read(*net->ipv4.icmp_sk); in icmp_sk() 289 if (!((1 << type) & net->ipv4.sysctl_icmp_ratemask)) in icmpv4_mask_allow() 326 peer = inet_getpeer_v4(net->ipv4.peers, fl4->daddr, vif, 1); in icmpv4_xrlim_allow() 327 rc = inet_peer_xrlim_allow(peer, net->ipv4.sysctl_icmp_ratelimit); in icmpv4_xrlim_allow() 682 net->ipv4.sysctl_icmp_errors_use_inbound_ifaddr) in __icmp_send() 824 switch (net->ipv4.sysctl_ip_no_pmtu_disc) { in icmp_unreach() 877 if (!net->ipv4.sysctl_icmp_ignore_bogus_error_responses && in icmp_unreach() 933 if (!net->ipv4.sysctl_icmp_echo_ignore_all) { in icmp_echo() 1057 net->ipv4.sysctl_icmp_echo_ignore_broadcasts) { in icmp_rcv() 1190 inet_ctl_sock_destroy(*per_cpu_ptr(net->ipv4.icmp_sk, i)); in icmp_sk_exit() [all …]
|
D | fib_frontend.c | 64 &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() 91 if (id == RT_TABLE_LOCAL && !net->ipv4.fib_has_custom_rules) in fib_new_table() 100 rcu_assign_pointer(net->ipv4.fib_main, tb); in fib_new_table() 103 rcu_assign_pointer(net->ipv4.fib_default, tb); in fib_new_table() 110 hlist_add_head_rcu(&tb->tb_hlist, &net->ipv4.fib_table_hash[h]); in fib_new_table() 126 head = &net->ipv4.fib_table_hash[h]; in fib_get_table() 137 return net->ipv4.fib_has_custom_rules; in fib4_has_custom_rules() 147 rcu_assign_pointer(net->ipv4.fib_main, new); in fib_replace_table() 150 rcu_assign_pointer(net->ipv4.fib_default, new); in fib_replace_table() [all …]
|
D | tcp_timer.c | 128 int retries = sock_net(sk)->ipv4.sysctl_tcp_orphan_retries; /* May be zero. */ in tcp_orphan_retries() 148 if (!net->ipv4.sysctl_tcp_mtu_probing) in tcp_mtu_probing() 156 mss = min(net->ipv4.sysctl_tcp_base_mss, mss); in tcp_mtu_probing() 157 mss = max(mss, net->ipv4.sysctl_tcp_mtu_probe_floor); in tcp_mtu_probing() 158 mss = max(mss, net->ipv4.sysctl_tcp_min_snd_mss); in tcp_mtu_probing() 227 retry_until = icsk->icsk_syn_retries ? : net->ipv4.sysctl_tcp_syn_retries; in tcp_write_timeout() 230 if (retransmits_timed_out(sk, net->ipv4.sysctl_tcp_retries1, 0)) { in tcp_write_timeout() 239 retry_until = net->ipv4.sysctl_tcp_retries2; in tcp_write_timeout() 366 max_probes = sock_net(sk)->ipv4.sysctl_tcp_retries2; in tcp_probe_timer() 393 sock_net(sk)->ipv4.sysctl_tcp_synack_retries + 1; /* add one more retry for fastopen */ in tcp_fastopen_synack_timer() [all …]
|
D | af_inet.c | 222 tcp_fastopen = sock_net(sk)->ipv4.sysctl_tcp_fastopen; in inet_listen() 340 if (net->ipv4.sysctl_ip_no_pmtu_disc) in inet_create() 1222 if (sock_net(sk)->ipv4.sysctl_ip_dynaddr > 1) { in inet_sk_reselect_saddr() 1277 if (!sock_net(sk)->ipv4.sysctl_ip_dynaddr || in inet_sk_rebuild_header() 1817 seqlock_init(&net->ipv4.ip_local_ports.lock); in inet_init_net() 1818 net->ipv4.ip_local_ports.range[0] = 32768; in inet_init_net() 1819 net->ipv4.ip_local_ports.range[1] = 60999; in inet_init_net() 1821 seqlock_init(&net->ipv4.ping_group_range.lock); in inet_init_net() 1826 net->ipv4.ping_group_range.range[0] = make_kgid(&init_user_ns, 1); in inet_init_net() 1827 net->ipv4.ping_group_range.range[1] = make_kgid(&init_user_ns, 0); in inet_init_net() [all …]
|
D | devinet.c | 94 IPV4_DEVCONF((*net->ipv4.devconf_dflt), attr) 262 memcpy(&in_dev->cnf, dev_net(dev)->ipv4.devconf_dflt, in inetdev_init() 678 ip_mc_config(net->ipv4.mc_autojoin_sk, false, ifa); in inet_rtm_deladdr() 943 int ret = ip_mc_config(net->ipv4.mc_autojoin_sk, in inet_rtm_newaddr() 1846 cb->seq = atomic_read(&tgt_net->ipv4.dev_addr_genid) ^ in inet_dump_ifaddr() 2177 devconf = net->ipv4.devconf_all; in inet_netconf_get_devconf() 2180 devconf = net->ipv4.devconf_dflt; in inet_netconf_get_devconf() 2246 cb->seq = atomic_read(&net->ipv4.dev_addr_genid) ^ in inet_netconf_dump_devconf() 2273 net->ipv4.devconf_all, in inet_netconf_dump_devconf() 2284 net->ipv4.devconf_dflt, in inet_netconf_dump_devconf() [all …]
|
D | ip_tunnel_core.c | 143 dst->key.u.ipv4.dst = src->key.u.ipv4.src; in iptunnel_metadata_reply() 257 tun_info->key.u.ipv4.dst = nla_get_in_addr(tb[LWTUNNEL_IP_DST]); in ip_tun_build_state() 260 tun_info->key.u.ipv4.src = nla_get_in_addr(tb[LWTUNNEL_IP_SRC]); in ip_tun_build_state() 295 nla_put_in_addr(skb, LWTUNNEL_IP_DST, tun_info->key.u.ipv4.dst) || in ip_tun_fill_encap_info() 296 nla_put_in_addr(skb, LWTUNNEL_IP_SRC, tun_info->key.u.ipv4.src) || in ip_tun_fill_encap_info()
|
D | xfrm4_policy.c | 189 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()
|
D | syncookies.c | 246 if (!net->ipv4.sysctl_tcp_timestamps) in cookie_timestamp_decode() 251 if (tcp_opt->sack_ok && !net->ipv4.sysctl_tcp_sack) in cookie_timestamp_decode() 260 return net->ipv4.sysctl_tcp_window_scaling != 0; in cookie_timestamp_decode() 272 if (net->ipv4.sysctl_tcp_ecn) in cookie_ecn_ok() 300 if (!sock_net(sk)->ipv4.sysctl_tcp_syncookies || !th->ack || th->rst) in cookie_v4_check()
|
/net/ipv4/netfilter/ |
D | iptable_nat.c | 33 return ipt_do_table(skb, state, state->net->ipv4.nat_table); in iptable_nat_do_chain() 93 if (net->ipv4.nat_table) in iptable_nat_table_init() 100 NULL, &net->ipv4.nat_table); in iptable_nat_table_init() 108 ipt_unregister_table(net, net->ipv4.nat_table, NULL); in iptable_nat_table_init() 109 net->ipv4.nat_table = NULL; in iptable_nat_table_init() 118 if (!net->ipv4.nat_table) in iptable_nat_net_exit() 121 ipt_unregister_table(net, net->ipv4.nat_table, NULL); in iptable_nat_net_exit() 122 net->ipv4.nat_table = NULL; in iptable_nat_net_exit()
|
D | arptable_filter.c | 37 return arpt_do_table(skb, state, state->net->ipv4.arptable_filter); in arptable_filter_hook() 47 if (net->ipv4.arptable_filter) in arptable_filter_table_init() 54 &net->ipv4.arptable_filter); in arptable_filter_table_init() 61 if (!net->ipv4.arptable_filter) in arptable_filter_net_exit() 63 arpt_unregister_table(net, net->ipv4.arptable_filter, arpfilter_ops); in arptable_filter_net_exit() 64 net->ipv4.arptable_filter = NULL; in arptable_filter_net_exit()
|
D | iptable_security.c | 43 return ipt_do_table(skb, state, state->net->ipv4.iptable_security); in iptable_security_hook() 53 if (net->ipv4.iptable_security) in iptable_security_table_init() 60 &net->ipv4.iptable_security); in iptable_security_table_init() 67 if (!net->ipv4.iptable_security) in iptable_security_net_exit() 70 ipt_unregister_table(net, net->ipv4.iptable_security, sectbl_ops); in iptable_security_net_exit() 71 net->ipv4.iptable_security = NULL; in iptable_security_net_exit()
|
D | iptable_mangle.c | 56 ret = ipt_do_table(skb, state, state->net->ipv4.iptable_mangle); in ipt_mangle_out() 82 return ipt_do_table(skb, state, state->net->ipv4.iptable_mangle); in iptable_mangle_hook() 91 if (net->ipv4.iptable_mangle) in iptable_mangle_table_init() 98 &net->ipv4.iptable_mangle); in iptable_mangle_table_init() 105 if (!net->ipv4.iptable_mangle) in iptable_mangle_net_exit() 107 ipt_unregister_table(net, net->ipv4.iptable_mangle, mangle_ops); in iptable_mangle_net_exit() 108 net->ipv4.iptable_mangle = NULL; in iptable_mangle_net_exit()
|
D | iptable_filter.c | 37 return ipt_do_table(skb, state, state->net->ipv4.iptable_filter); in iptable_filter_hook() 51 if (net->ipv4.iptable_filter) in iptable_filter_table_init() 62 &net->ipv4.iptable_filter); in iptable_filter_table_init() 77 if (!net->ipv4.iptable_filter) in iptable_filter_net_exit() 79 ipt_unregister_table(net, net->ipv4.iptable_filter, filter_ops); in iptable_filter_net_exit() 80 net->ipv4.iptable_filter = NULL; in iptable_filter_net_exit()
|
D | iptable_raw.c | 44 return ipt_do_table(skb, state, state->net->ipv4.iptable_raw); in iptable_raw_hook() 58 if (net->ipv4.iptable_raw) in iptable_raw_table_init() 65 &net->ipv4.iptable_raw); in iptable_raw_table_init() 72 if (!net->ipv4.iptable_raw) in iptable_raw_net_exit() 74 ipt_unregister_table(net, net->ipv4.iptable_raw, rawtable_ops); in iptable_raw_net_exit() 75 net->ipv4.iptable_raw = NULL; in iptable_raw_net_exit()
|
/net/core/ |
D | lwt_bpf.c | 183 bool ipv4; in bpf_lwt_xmit_reroute() local 186 ipv4 = true; in bpf_lwt_xmit_reroute() 188 ipv4 = false; in bpf_lwt_xmit_reroute() 201 if (ipv4) { in bpf_lwt_xmit_reroute() 536 static int handle_gso_encap(struct sk_buff *skb, bool ipv4, int encap_len) in handle_gso_encap() argument 549 if (ipv4) { in handle_gso_encap() 582 if (ipv4) in handle_gso_encap() 595 bool ipv4; in bpf_lwt_push_ip_encap() local 604 ipv4 = true; in bpf_lwt_push_ip_encap() 608 ipv4 = false; in bpf_lwt_push_ip_encap() [all …]
|
/net/tipc/ |
D | udp_media.c | 71 struct in_addr ipv4; member 102 return ipv4_is_multicast(addr->ipv4.s_addr); in tipc_udp_is_mcast_addr() 128 snprintf(buf, size, "%pI4:%u", &ua->ipv4, ntohs(ua->port)); in tipc_udp_addr2str() 172 .daddr = dst->ipv4.s_addr, in tipc_udp_xmit() 173 .saddr = src->ipv4.s_addr, in tipc_udp_xmit() 186 udp_tunnel_xmit_skb(rt, ub->ubsock->sk, skb, src->ipv4.s_addr, in tipc_udp_xmit() 187 dst->ipv4.s_addr, 0, ttl, 0, src->port, in tipc_udp_xmit() 310 pr_info("New replicast peer: %pI4\n", &rcast->addr.ipv4); in tipc_udp_rcast_add() 335 src.ipv4.s_addr = iphdr->saddr; in tipc_udp_rcast_disc() 400 mreqn.imr_multiaddr = remote->ipv4; in enable_mcast() [all …]
|
/net/ipv6/ |
D | output_core.c | 28 if (unlikely(siphash_key_is_zero(&net->ipv4.ip_id_key))) in __ipv6_select_ident() 29 get_random_bytes(&net->ipv4.ip_id_key, in __ipv6_select_ident() 30 sizeof(net->ipv4.ip_id_key)); in __ipv6_select_ident() 32 hash = siphash(&combined, sizeof(combined), &net->ipv4.ip_id_key); in __ipv6_select_ident()
|
/net/openvswitch/ |
D | flow.c | 544 memset(&key->ipv4, 0, sizeof(key->ipv4)); in key_extract_l3l4() 553 key->ipv4.addr.src = nh->saddr; in key_extract_l3l4() 554 key->ipv4.addr.dst = nh->daddr; in key_extract_l3l4() 631 memcpy(&key->ipv4.addr.src, arp->ar_sip, sizeof(key->ipv4.addr.src)); in key_extract_l3l4() 632 memcpy(&key->ipv4.addr.dst, arp->ar_tip, sizeof(key->ipv4.addr.dst)); in key_extract_l3l4() 633 ether_addr_copy(key->ipv4.arp.sha, arp->ar_sha); in key_extract_l3l4() 634 ether_addr_copy(key->ipv4.arp.tha, arp->ar_tha); in key_extract_l3l4() 637 memset(&key->ipv4, 0, sizeof(key->ipv4)); in key_extract_l3l4()
|
D | flow_netlink.c | 657 bool ttl = false, ipv4 = false, ipv6 = false; in ip_tun_from_nlattr() local 688 SW_FLOW_KEY_PUT(match, tun_key.u.ipv4.src, in ip_tun_from_nlattr() 690 ipv4 = true; in ip_tun_from_nlattr() 693 SW_FLOW_KEY_PUT(match, tun_key.u.ipv4.dst, in ip_tun_from_nlattr() 695 ipv4 = true; in ip_tun_from_nlattr() 777 ipv4 = true; in ip_tun_from_nlattr() 799 if (ipv4 && ipv6) { in ip_tun_from_nlattr() 805 if (!ipv4 && !ipv6) { in ip_tun_from_nlattr() 809 if (ipv4) { in ip_tun_from_nlattr() 811 if (match->key->tun_key.u.ipv4.src || in ip_tun_from_nlattr() [all …]
|