/Linux-v6.1/net/ipv4/ |
D | sysctl_net_ipv4.c | 52 write_seqlock_bh(&net->ipv4.ip_local_ports.lock); in set_local_port_range() 53 if (same_parity && !net->ipv4.ip_local_ports.warned) { in set_local_port_range() 54 net->ipv4.ip_local_ports.warned = true; in set_local_port_range() 57 net->ipv4.ip_local_ports.range[0] = range[0]; in set_local_port_range() 58 net->ipv4.ip_local_ports.range[1] = range[1]; in set_local_port_range() 59 write_sequnlock_bh(&net->ipv4.ip_local_ports.lock); in set_local_port_range() 67 container_of(table->data, struct net, ipv4.ip_local_ports.range); in ipv4_local_port_range() 88 (range[0] < READ_ONCE(net->ipv4.sysctl_ip_prot_sock))) in ipv4_local_port_range() 102 ipv4.sysctl_ip_prot_sock); in ipv4_privileged_ports() 114 pports = READ_ONCE(net->ipv4.sysctl_ip_prot_sock); in ipv4_privileged_ports() [all …]
|
D | tcp_ipv4.c | 111 int reuse = READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_tw_reuse); in tcp_twsk_unique() 250 tcp_death_row = &sock_net(sk)->ipv4.tcp_death_row; in tcp_v4_connect() 487 sk = __inet_lookup_established(net, net->ipv4.tcp_death_row.hashinfo, in tcp_v4_err() 752 sk1 = __inet_lookup_listener(net, net->ipv4.tcp_death_row.hashinfo, in tcp_v4_send_reset() 1020 tos = READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_reflect_tos) ? in tcp_v4_send_synack() 1540 if (READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_reflect_tos)) in tcp_v4_syn_recv_sock() 1738 sk = __inet_lookup_established(net, net->ipv4.tcp_death_row.hashinfo, in tcp_v4_early_demux() 1966 sk = __inet_lookup_skb(net->ipv4.tcp_death_row.hashinfo, in tcp_v4_rcv() 2150 net->ipv4.tcp_death_row.hashinfo, in tcp_v4_rcv() 2301 struct inet_hashinfo *hinfo = seq_file_net(seq)->ipv4.tcp_death_row.hashinfo; in listening_get_first() [all …]
|
D | fib_notifier.c | 25 net->ipv4.fib_seq++; in call_fib4_notifiers() 33 return net->ipv4.fib_seq + fib4_rules_seq_read(net); in fib4_seq_read() 59 net->ipv4.fib_seq = 0; in fib4_notifier_init() 64 net->ipv4.notifier_ops = ops; in fib4_notifier_init() 71 fib_notifier_ops_unregister(net->ipv4.notifier_ops); in fib4_notifier_exit()
|
D | fib_rules.c | 93 err = fib_rules_lookup(net->ipv4.rules_ops, flowi4_to_flowi(flp), 0, &arg); in __fib_lookup() 270 atomic_inc(&net->ipv4.fib_num_tclassid_users); in fib4_rule_configure() 275 net->ipv4.fib_rules_require_fldissect++; in fib4_rule_configure() 282 net->ipv4.fib_has_custom_rules = true; in fib4_rule_configure() 301 atomic_dec(&net->ipv4.fib_num_tclassid_users); in fib4_rule_delete() 303 net->ipv4.fib_has_custom_rules = true; in fib4_rule_delete() 305 if (net->ipv4.fib_rules_require_fldissect && in fib4_rule_delete() 307 net->ipv4.fib_rules_require_fldissect--; in fib4_rule_delete() 422 net->ipv4.rules_ops = ops; in fib4_rules_init() 423 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() 217 q = inet_frag_find(net->ipv4.fqdir, &key); in ip_find() 604 table[0].data = &net->ipv4.fqdir->high_thresh; in ip4_frags_ns_ctl_register() 605 table[0].extra1 = &net->ipv4.fqdir->low_thresh; in ip4_frags_ns_ctl_register() 606 table[1].data = &net->ipv4.fqdir->low_thresh; in ip4_frags_ns_ctl_register() 607 table[1].extra2 = &net->ipv4.fqdir->high_thresh; in ip4_frags_ns_ctl_register() 608 table[2].data = &net->ipv4.fqdir->timeout; in ip4_frags_ns_ctl_register() 609 table[3].data = &net->ipv4.fqdir->max_dist; in ip4_frags_ns_ctl_register() 615 net->ipv4.frags_hdr = hdr; in ip4_frags_ns_ctl_register() 629 table = net->ipv4.frags_hdr->ctl_table_arg; in ip4_frags_ns_ctl_unregister() [all …]
|
D | tcp_fastopen.c | 13 ctxt = rcu_dereference(net->ipv4.tcp_fastopen_ctx); in tcp_fastopen_init_key_once() 52 ctxt = xchg((__force struct tcp_fastopen_context **)&net->ipv4.tcp_fastopen_ctx, NULL); in tcp_fastopen_ctx_destroy() 85 octx = xchg((__force struct tcp_fastopen_context **)&net->ipv4.tcp_fastopen_ctx, ctx); in tcp_fastopen_reset_cipher() 104 ctx = rcu_dereference(net->ipv4.tcp_fastopen_ctx); in tcp_fastopen_get_cipher() 336 return (READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_fastopen) & flag) || in tcp_fastopen_no_cookie() 351 int tcp_fastopen = READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_fastopen); in tcp_try_fastopen() 493 if (!READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_fastopen_blackhole_timeout)) in tcp_fastopen_active_disable() 497 WRITE_ONCE(net->ipv4.tfo_active_disable_stamp, jiffies); in tcp_fastopen_active_disable() 503 atomic_inc(&net->ipv4.tfo_active_disable_times); in tcp_fastopen_active_disable() 515 READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_fastopen_blackhole_timeout); in tcp_fastopen_active_should_disable() [all …]
|
/Linux-v6.1/tools/testing/selftests/bpf/progs/ |
D | test_sk_assign.c | 43 get_tuple(struct __sk_buff *skb, bool *ipv4, bool *tcp) in get_tuple() argument 67 *ipv4 = true; in get_tuple() 76 *ipv4 = false; in get_tuple() 90 handle_udp(struct __sk_buff *skb, struct bpf_sock_tuple *tuple, bool ipv4) in handle_udp() argument 98 tuple_len = ipv4 ? sizeof(tuple->ipv4) : sizeof(tuple->ipv6); in handle_udp() 106 dport = ipv4 ? tuple->ipv4.dport : tuple->ipv6.dport; in handle_udp() 121 handle_tcp(struct __sk_buff *skb, struct bpf_sock_tuple *tuple, bool ipv4) in handle_tcp() argument 129 tuple_len = ipv4 ? sizeof(tuple->ipv4) : sizeof(tuple->ipv6); in handle_tcp() 140 dport = ipv4 ? tuple->ipv4.dport : tuple->ipv6.dport; in handle_tcp() 163 bool ipv4 = false; in bpf_sk_assign_test() local [all …]
|
D | xdp_synproxy_kern.c | 347 struct iphdr *ipv4; member 364 hdr->ipv4 = (void *)hdr->eth + sizeof(*hdr->eth); in tcp_dissect() 365 if (hdr->ipv4 + 1 > data_end) in tcp_dissect() 367 if (hdr->ipv4->ihl * 4 < sizeof(*hdr->ipv4)) in tcp_dissect() 369 if (hdr->ipv4->version != 4) in tcp_dissect() 372 if (hdr->ipv4->protocol != IPPROTO_TCP) in tcp_dissect() 375 hdr->tcp = (void *)hdr->ipv4 + hdr->ipv4->ihl * 4; in tcp_dissect() 378 hdr->ipv4 = NULL; in tcp_dissect() 418 if (hdr->ipv4) { in tcp_lookup() 422 if ((hdr->ipv4->frag_off & bpf_htons(IP_DF | IP_MF | IP_OFFSET)) != bpf_htons(IP_DF)) in tcp_lookup() [all …]
|
D | test_bpf_nf.c | 75 __builtin_memset(&bpf_tuple, 0, sizeof(bpf_tuple.ipv4)); in nf_ct_test() 84 ct = lookup_fn(ctx, &bpf_tuple, sizeof(bpf_tuple.ipv4), &opts_def, in nf_ct_test() 94 ct = lookup_fn(ctx, &bpf_tuple, sizeof(bpf_tuple.ipv4), &opts_def, in nf_ct_test() 102 ct = lookup_fn(ctx, &bpf_tuple, sizeof(bpf_tuple.ipv4), &opts_def, in nf_ct_test() 110 ct = lookup_fn(ctx, &bpf_tuple, sizeof(bpf_tuple.ipv4), &opts_def, in nf_ct_test() 119 ct = lookup_fn(ctx, &bpf_tuple, sizeof(bpf_tuple.ipv4), &opts_def, in nf_ct_test() 127 ct = lookup_fn(ctx, &bpf_tuple, sizeof(bpf_tuple.ipv4), &opts_def, in nf_ct_test() 134 ct = lookup_fn(ctx, &bpf_tuple, sizeof(bpf_tuple.ipv4) - 1, &opts_def, in nf_ct_test() 141 bpf_tuple.ipv4.saddr = bpf_get_prandom_u32(); /* src IP */ in nf_ct_test() 142 bpf_tuple.ipv4.daddr = bpf_get_prandom_u32(); /* dst IP */ in nf_ct_test() [all …]
|
D | test_cls_redirect.c | 91 offsetofend(struct bpf_sock_tuple, ipv4.dport) - 92 offsetof(struct bpf_sock_tuple, ipv4.sport) - 1, 198 static INLINING bool pkt_skip_ipv4_options(buf_t *buf, const struct iphdr *ipv4) in pkt_skip_ipv4_options() argument 200 if (ipv4->ihl <= 5) { in pkt_skip_ipv4_options() 204 return buf_skip(buf, (ipv4->ihl - 5) * 4); in pkt_skip_ipv4_options() 215 struct iphdr *ipv4 = buf_assign(pkt, sizeof(*ipv4), scratch); in pkt_parse_ipv4() local 216 if (ipv4 == NULL) { in pkt_parse_ipv4() 220 if (ipv4->ihl < 5) { in pkt_parse_ipv4() 224 if (!pkt_skip_ipv4_options(pkt, ipv4)) { in pkt_parse_ipv4() 228 return ipv4; in pkt_parse_ipv4() [all …]
|
D | connect4_prog.c | 153 memset(&tuple.ipv4.saddr, 0, sizeof(tuple.ipv4.saddr)); in connect_v4_prog() 154 memset(&tuple.ipv4.sport, 0, sizeof(tuple.ipv4.sport)); in connect_v4_prog() 156 tuple.ipv4.daddr = bpf_htonl(DST_REWRITE_IP4); in connect_v4_prog() 157 tuple.ipv4.dport = bpf_htons(DST_REWRITE_PORT4); in connect_v4_prog() 172 sk = bpf_sk_lookup_tcp(ctx, &tuple, sizeof(tuple.ipv4), in connect_v4_prog() 175 sk = bpf_sk_lookup_udp(ctx, &tuple, sizeof(tuple.ipv4), in connect_v4_prog() 181 if (sk->src_ip4 != tuple.ipv4.daddr || in connect_v4_prog()
|
D | test_bpf_nf_fail.c | 34 ct = bpf_skb_ct_alloc(ctx, &tup, sizeof(tup.ipv4), &opts, sizeof(opts)); in alloc_release() 48 ct = bpf_skb_ct_alloc(ctx, &tup, sizeof(tup.ipv4), &opts, sizeof(opts)); in insert_insert() 65 ct = bpf_skb_ct_lookup(ctx, &tup, sizeof(tup.ipv4), &opts, sizeof(opts)); in lookup_insert() 79 ct = bpf_skb_ct_lookup(ctx, &tup, sizeof(tup.ipv4), &opts, sizeof(opts)); in write_not_allowlisted_field() 93 ct = bpf_skb_ct_alloc(ctx, &tup, sizeof(tup.ipv4), &opts, sizeof(opts)); in set_timeout_after_insert() 110 ct = bpf_skb_ct_alloc(ctx, &tup, sizeof(tup.ipv4), &opts, sizeof(opts)); in set_status_after_insert() 127 ct = bpf_skb_ct_alloc(ctx, &tup, sizeof(tup.ipv4), &opts, sizeof(opts)); in change_timeout_after_alloc() 141 ct = bpf_skb_ct_alloc(ctx, &tup, sizeof(tup.ipv4), &opts, sizeof(opts)); in change_status_after_alloc()
|
D | test_sk_lookup_kern.c | 23 bool *ipv4) in get_tuple() argument 36 *ipv4 = true; in get_tuple() 45 *ipv4 = true; in get_tuple() 64 bool ipv4; in sk_lookup_success() local 69 tuple = get_tuple(data, sizeof(*eth), data_end, eth->h_proto, &ipv4); in sk_lookup_success() 73 tuple_len = ipv4 ? sizeof(tuple->ipv4) : sizeof(tuple->ipv6); in sk_lookup_success()
|
/Linux-v6.1/drivers/infiniband/hw/irdma/ |
D | trace_cm.h | 15 #define __print_ip_addr(addr, port, ipv4) print_ip_addr(p, addr, port, ipv4) argument 26 __field(bool, ipv4) 30 __entry->ipv4 = cm_info->ipv4; 37 __entry->lport, __entry->ipv4) 48 __field(bool, ipv4) 53 __entry->ipv4 = listener->ipv4; 61 __entry->lport, __entry->ipv4) 71 __field(bool, ipv4) 79 __entry->ipv4 = listener->ipv4; 88 __entry->lport, __entry->ipv4) [all …]
|
/Linux-v6.1/drivers/net/ethernet/mediatek/ |
D | mtk_ppe_debugfs.c | 106 ai.src_port = &entry->ipv4.orig.src_port; in mtk_ppe_debugfs_foe_show() 107 ai.dest_port = &entry->ipv4.orig.dest_port; in mtk_ppe_debugfs_foe_show() 110 ai.src = &entry->ipv4.orig.src_ip; in mtk_ppe_debugfs_foe_show() 111 ai.dest = &entry->ipv4.orig.dest_ip; in mtk_ppe_debugfs_foe_show() 131 ai.src_port = &entry->ipv4.new.src_port; in mtk_ppe_debugfs_foe_show() 132 ai.dest_port = &entry->ipv4.new.dest_port; in mtk_ppe_debugfs_foe_show() 135 ai.src = &entry->ipv4.new.src_ip; in mtk_ppe_debugfs_foe_show() 136 ai.dest = &entry->ipv4.new.dest_ip; in mtk_ppe_debugfs_foe_show() 146 l2 = &entry->ipv4.l2; in mtk_ppe_debugfs_foe_show() 147 ib2 = entry->ipv4.ib2; in mtk_ppe_debugfs_foe_show()
|
/Linux-v6.1/tools/testing/selftests/netfilter/ |
D | ipvs.sh | 141 ip netns exec ns1 sysctl -qw net.ipv4.ip_forward=1 147 ip netns exec ns2 sysctl -qw net.ipv4.conf.all.arp_ignore=1 148 ip netns exec ns2 sysctl -qw net.ipv4.conf.all.arp_announce=2 150 ip netns exec ns2 sysctl -qw net.ipv4.conf.all.rp_filter=0 151 ip netns exec ns2 sysctl -qw net.ipv4.conf.veth21.rp_filter=0 160 ip netns exec ns1 sysctl -qw net.ipv4.ip_forward=1 176 ip netns exec ns1 sysctl -qw net.ipv4.ip_forward=0 177 ip netns exec ns1 sysctl -qw net.ipv4.conf.all.send_redirects=0 178 ip netns exec ns1 sysctl -qw net.ipv4.conf.default.send_redirects=0 185 ip netns exec ns2 sysctl -qw net.ipv4.conf.all.arp_ignore=1 [all …]
|
/Linux-v6.1/tools/testing/selftests/net/forwarding/ |
D | gre_custom_multipath_hash.sh | 381 sysctl_set net.ipv4.neigh.default.gc_thresh1 1024 382 sysctl_set net.ipv4.neigh.default.gc_thresh2 1024 383 sysctl_set net.ipv4.neigh.default.gc_thresh3 1024 385 sysctl_set net.ipv4.fib_multipath_hash_fields 0x0040 389 sysctl_set net.ipv4.fib_multipath_hash_fields 0x0080 393 sysctl_set net.ipv4.fib_multipath_hash_fields 0x0400 397 sysctl_set net.ipv4.fib_multipath_hash_fields 0x0800 401 sysctl_restore net.ipv4.neigh.default.gc_thresh3 402 sysctl_restore net.ipv4.neigh.default.gc_thresh2 403 sysctl_restore net.ipv4.neigh.default.gc_thresh1 [all …]
|
D | router_broadcast.sh | 146 sysctl_set net.ipv4.conf.all.bc_forwarding 0 147 sysctl_set net.ipv4.conf.$rp1.bc_forwarding 0 148 sysctl_set net.ipv4.conf.$rp2.bc_forwarding 0 153 sysctl_set net.ipv4.conf.all.bc_forwarding 1 154 sysctl_set net.ipv4.conf.$rp1.bc_forwarding 1 155 sysctl_set net.ipv4.conf.$rp2.bc_forwarding 1 160 sysctl_restore net.ipv4.conf.$rp2.bc_forwarding 161 sysctl_restore net.ipv4.conf.$rp1.bc_forwarding 162 sysctl_restore net.ipv4.conf.all.bc_forwarding 183 sysctl_set net.ipv4.icmp_echo_ignore_broadcasts 0 [all …]
|
D | custom_multipath_hash.sh | 284 sysctl_set net.ipv4.fib_multipath_hash_policy 3 288 sysctl_set net.ipv4.neigh.default.gc_thresh1 1024 289 sysctl_set net.ipv4.neigh.default.gc_thresh2 1024 290 sysctl_set net.ipv4.neigh.default.gc_thresh3 1024 292 sysctl_set net.ipv4.fib_multipath_hash_fields 0x0001 296 sysctl_set net.ipv4.fib_multipath_hash_fields 0x0002 300 sysctl_set net.ipv4.fib_multipath_hash_fields 0x0010 304 sysctl_set net.ipv4.fib_multipath_hash_fields 0x0020 308 sysctl_restore net.ipv4.neigh.default.gc_thresh3 309 sysctl_restore net.ipv4.neigh.default.gc_thresh2 [all …]
|
D | mirror_gre_nh.sh | 32 sysctl_set net.ipv4.conf.all.rp_filter 0 33 sysctl_set net.ipv4.conf.$h3.rp_filter 0 38 sysctl_set net.ipv4.conf.v$h3.rp_filter 0 66 sysctl_restore net.ipv4.conf.v$h3.rp_filter 0 71 sysctl_restore net.ipv4.conf.$h3.rp_filter 72 sysctl_restore net.ipv4.conf.all.rp_filter
|
/Linux-v6.1/tools/testing/selftests/net/ |
D | route_localnet.sh | 16 sysctl -w net.ipv4.conf.veth0.route_localnet=1 17 ip netns exec "${PEER_NS}" sysctl -w net.ipv4.conf.veth1.route_localnet=1 40 sysctl -w net.ipv4.conf.veth0.arp_announce=2 41 ip netns exec "${PEER_NS}" sysctl -w net.ipv4.conf.veth1.arp_announce=2 57 sysctl -w net.ipv4.conf.veth0.arp_ignore=3 58 ip netns exec "${PEER_NS}" sysctl -w net.ipv4.conf.veth1.arp_ignore=3
|
/Linux-v6.1/drivers/infiniband/hw/usnic/ |
D | usnic_fwd.h | 115 filter->u.ipv4.flags = FILTER_FIELD_5TUP_PROTO; in usnic_fwd_init_udp_filter() 116 filter->u.ipv4.protocol = PROTO_UDP; in usnic_fwd_init_udp_filter() 119 filter->u.ipv4.flags |= FILTER_FIELD_5TUP_DST_AD; in usnic_fwd_init_udp_filter() 120 filter->u.ipv4.dst_addr = daddr; in usnic_fwd_init_udp_filter() 124 filter->u.ipv4.flags |= FILTER_FIELD_5TUP_DST_PT; in usnic_fwd_init_udp_filter() 125 filter->u.ipv4.dst_port = dport; in usnic_fwd_init_udp_filter()
|
/Linux-v6.1/samples/bpf/ |
D | tc_l2_redirect.sh | 10 RP_FILTER=$(< /proc/sys/net/ipv4/conf/all/rp_filter) 48 $IP netns exec ns2 sysctl -q -w net.ipv4.conf.all.rp_filter=0 49 $IP netns exec ns2 sysctl -q -w net.ipv4.conf.ipt2.rp_filter=0 53 $IP netns exec ns2 sysctl -q -w net.ipv4.conf.all.rp_filter=0 54 $IP netns exec ns2 sysctl -q -w net.ipv4.conf.ip6t2.rp_filter=0 65 sysctl -q -w net.ipv4.conf.all.rp_filter=0 78 sysctl -q -w net.ipv4.conf.all.rp_filter=$RP_FILTER 94 sysctl -q -w net.ipv4.conf.ipt.rp_filter=0 95 sysctl -q -w net.ipv4.conf.ipt.forwarding=1 100 sysctl -q -w net.ipv4.conf.ve1.forwarding=1 [all …]
|
/Linux-v6.1/drivers/infiniband/hw/ocrdma/ |
D | ocrdma_ah.c | 83 struct iphdr ipv4; in set_av_attr() local 128 *((__be16 *)&ipv4) = htons((4 << 12) | (5 << 8) | in set_av_attr() 130 ipv4.id = cpu_to_be16(pdid); in set_av_attr() 131 ipv4.frag_off = htons(IP_DF); in set_av_attr() 132 ipv4.tot_len = htons(0); in set_av_attr() 133 ipv4.ttl = ib_grh->hop_limit; in set_av_attr() 134 ipv4.protocol = nxthdr; in set_av_attr() 136 ipv4.saddr = sgid_addr._sockaddr_in.sin_addr.s_addr; in set_av_attr() 138 ipv4.daddr = dgid_addr._sockaddr_in.sin_addr.s_addr; in set_av_attr() 139 memcpy((u8 *)ah->av + eth_sz, &ipv4, sizeof(struct iphdr)); in set_av_attr()
|
/Linux-v6.1/drivers/net/ethernet/mellanox/mlx5/core/en/tc/ |
D | ct_fs_smfs.c | 47 mlx5_ct_fs_smfs_fill_mask(struct mlx5_ct_fs *fs, struct mlx5_flow_spec *spec, bool ipv4, bool tcp, in mlx5_ct_fs_smfs_fill_mask() argument 58 if (likely(ipv4)) { in mlx5_ct_fs_smfs_fill_mask() 60 src_ipv4_src_ipv6.ipv4_layout.ipv4); in mlx5_ct_fs_smfs_fill_mask() 62 dst_ipv4_dst_ipv6.ipv4_layout.ipv4); in mlx5_ct_fs_smfs_fill_mask() 90 mlx5_ct_fs_smfs_matcher_create(struct mlx5_ct_fs *fs, struct mlx5dr_table *tbl, bool ipv4, in mlx5_ct_fs_smfs_matcher_create() argument 100 mlx5_ct_fs_smfs_fill_mask(fs, spec, ipv4, tcp, gre); in mlx5_ct_fs_smfs_matcher_create() 112 mlx5_ct_fs_smfs_matcher_get(struct mlx5_ct_fs *fs, bool nat, bool ipv4, bool tcp, bool gre) in mlx5_ct_fs_smfs_matcher_get() argument 123 smfs_matcher = &matchers->smfs_matchers[ipv4 * 3 + tcp * 2 + gre]; in mlx5_ct_fs_smfs_matcher_get() 149 dr_matcher = mlx5_ct_fs_smfs_matcher_create(fs, tbl, ipv4, tcp, gre, prio); in mlx5_ct_fs_smfs_matcher_get() 153 nat, ipv4, tcp, gre, PTR_ERR(dr_matcher)); in mlx5_ct_fs_smfs_matcher_get() [all …]
|