/kernel/linux/linux-6.6/net/ipv4/ |
H A D | sysctl_net_ipv4.c | 6 * Added /proc/sys/net/ipv4 directory entry (empty =) ). [MS] 57 write_seqlock_bh(&net->ipv4.ip_local_ports.lock); in set_local_port_range() 58 if (same_parity && !net->ipv4.ip_local_ports.warned) { in set_local_port_range() 59 net->ipv4.ip_local_ports.warned = true; in set_local_port_range() 62 net->ipv4.ip_local_ports.range[0] = range[0]; in set_local_port_range() 63 net->ipv4.ip_local_ports.range[1] = range[1]; in set_local_port_range() 64 write_sequnlock_bh(&net->ipv4.ip_local_ports.lock); in set_local_port_range() 72 container_of(table->data, struct net, ipv4.ip_local_ports.range); in ipv4_local_port_range() 93 (range[0] < READ_ONCE(net->ipv4.sysctl_ip_prot_sock))) in ipv4_local_port_range() 107 ipv4 in ipv4_privileged_ports() [all...] |
H A D | tcp_plb.c | 30 if (!READ_ONCE(net->ipv4.sysctl_tcp_plb_enabled)) in tcp_plb_update_state() 34 if (cong_ratio < READ_ONCE(net->ipv4.sysctl_tcp_plb_cong_thresh)) in tcp_plb_update_state() 37 READ_ONCE(net->ipv4.sysctl_tcp_plb_rehash_rounds)) in tcp_plb_update_state() 52 if (!READ_ONCE(net->ipv4.sysctl_tcp_plb_enabled)) in tcp_plb_check_rehash() 56 READ_ONCE(net->ipv4.sysctl_tcp_plb_rehash_rounds); in tcp_plb_check_rehash() 58 idle_rehash = READ_ONCE(net->ipv4.sysctl_tcp_plb_idle_rehash_rounds) && in tcp_plb_check_rehash() 61 READ_ONCE(net->ipv4.sysctl_tcp_plb_idle_rehash_rounds); in tcp_plb_check_rehash() 71 max_suspend = 2 * READ_ONCE(net->ipv4.sysctl_tcp_plb_suspend_rto_sec) * HZ; in tcp_plb_check_rehash() 96 if (!READ_ONCE(net->ipv4.sysctl_tcp_plb_enabled)) in tcp_plb_update_state_upon_rto() 99 pause = READ_ONCE(net->ipv4 in tcp_plb_update_state_upon_rto() [all...] |
/kernel/linux/linux-5.10/net/ipv4/ |
H A D | sysctl_net_ipv4.c | 6 * Added /proc/sys/net/ipv4 directory entry (empty =) ). [MS] 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() 77 container_of(table->data, struct net, ipv4.ip_local_ports.range); in ipv4_local_port_range() 98 (range[0] < READ_ONCE(net->ipv4.sysctl_ip_prot_sock))) in ipv4_local_port_range() 112 ipv4 in ipv4_privileged_ports() [all...] |
H A 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 in tcp_fastopen_reset_cipher() [all...] |
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/progs/ |
H A D | test_sk_assign.c | 55 get_tuple(struct __sk_buff *skb, bool *ipv4, bool *tcp) in get_tuple() argument 79 *ipv4 = true; in get_tuple() 88 *ipv4 = false; in get_tuple() 102 handle_udp(struct __sk_buff *skb, struct bpf_sock_tuple *tuple, bool ipv4) in handle_udp() argument 111 tuple_len = ipv4 ? sizeof(tuple->ipv4) : sizeof(tuple->ipv6); in handle_udp() 119 dport = ipv4 ? tuple->ipv4.dport : tuple->ipv6.dport; in handle_udp() 134 handle_tcp(struct __sk_buff *skb, struct bpf_sock_tuple *tuple, bool ipv4) in handle_tcp() argument 143 tuple_len = ipv4 in handle_tcp() 177 bool ipv4 = false; bpf_sk_assign_test() local [all...] |
H A D | test_cls_redirect.c | 90 offsetofend(struct bpf_sock_tuple, ipv4.dport) - 91 offsetof(struct bpf_sock_tuple, ipv4.sport) - 1, 197 static INLINING bool pkt_skip_ipv4_options(buf_t *buf, const struct iphdr *ipv4) in pkt_skip_ipv4_options() argument 199 if (ipv4->ihl <= 5) { in pkt_skip_ipv4_options() 203 return buf_skip(buf, (ipv4->ihl - 5) * 4); in pkt_skip_ipv4_options() 214 struct iphdr *ipv4 = buf_assign(pkt, sizeof(*ipv4), scratch); in pkt_parse_ipv4() local 215 if (ipv4 == NULL) { in pkt_parse_ipv4() 219 if (ipv4->ihl < 5) { in pkt_parse_ipv4() 223 if (!pkt_skip_ipv4_options(pkt, ipv4)) { in pkt_parse_ipv4() 616 struct iphdr *ipv4 = (struct iphdr *)iph; fill_tuple() local 732 const struct iphdr *ipv4 = pkt_parse_ipv4(pkt, &_ip4); process_icmpv4() local 852 struct iphdr *ipv4 = pkt_parse_ipv4(pkt, &_ip4); process_ipv4() local [all...] |
H A D | connect4_prog.c | 154 memset(&tuple.ipv4.saddr, 0, sizeof(tuple.ipv4.saddr)); in connect_v4_prog() 155 memset(&tuple.ipv4.sport, 0, sizeof(tuple.ipv4.sport)); in connect_v4_prog() 157 tuple.ipv4.daddr = bpf_htonl(DST_REWRITE_IP4); in connect_v4_prog() 158 tuple.ipv4.dport = bpf_htons(DST_REWRITE_PORT4); in connect_v4_prog() 173 sk = bpf_sk_lookup_tcp(ctx, &tuple, sizeof(tuple.ipv4), in connect_v4_prog() 176 sk = bpf_sk_lookup_udp(ctx, &tuple, sizeof(tuple.ipv4), in connect_v4_prog() 182 if (sk->src_ip4 != tuple.ipv4.daddr || in connect_v4_prog()
|
/kernel/linux/linux-6.6/tools/testing/selftests/bpf/progs/ |
H A D | test_sk_assign.c | 55 get_tuple(struct __sk_buff *skb, bool *ipv4, bool *tcp) in get_tuple() argument 78 *ipv4 = true; in get_tuple() 87 *ipv4 = false; in get_tuple() 102 handle_udp(struct __sk_buff *skb, struct bpf_sock_tuple *tuple, bool ipv4) in handle_udp() argument 110 tuple_len = ipv4 ? sizeof(tuple->ipv4) : sizeof(tuple->ipv6); in handle_udp() 118 dport = ipv4 ? tuple->ipv4.dport : tuple->ipv6.dport; in handle_udp() 133 handle_tcp(struct __sk_buff *skb, struct bpf_sock_tuple *tuple, bool ipv4) in handle_tcp() argument 141 tuple_len = ipv4 in handle_tcp() 175 bool ipv4 = false; bpf_sk_assign_test() local [all...] |
H A D | xdp_synproxy_kern.c | 367 struct iphdr *ipv4; member 384 hdr->ipv4 = (void *)hdr->eth + sizeof(*hdr->eth); in tcp_dissect() 385 if (hdr->ipv4 + 1 > data_end) in tcp_dissect() 387 if (hdr->ipv4->ihl * 4 < sizeof(*hdr->ipv4)) in tcp_dissect() 389 if (hdr->ipv4->version != 4) in tcp_dissect() 392 if (hdr->ipv4->protocol != IPPROTO_TCP) in tcp_dissect() 395 hdr->tcp = (void *)hdr->ipv4 + hdr->ipv4->ihl * 4; in tcp_dissect() 398 hdr->ipv4 in tcp_dissect() [all...] |
H A D | test_bpf_nf.c | 79 __builtin_memset(&bpf_tuple, 0, sizeof(bpf_tuple.ipv4)); in nf_ct_test() 88 ct = lookup_fn(ctx, &bpf_tuple, sizeof(bpf_tuple.ipv4), &opts_def, in nf_ct_test() 98 ct = lookup_fn(ctx, &bpf_tuple, sizeof(bpf_tuple.ipv4), &opts_def, in nf_ct_test() 106 ct = lookup_fn(ctx, &bpf_tuple, sizeof(bpf_tuple.ipv4), &opts_def, in nf_ct_test() 114 ct = lookup_fn(ctx, &bpf_tuple, sizeof(bpf_tuple.ipv4), &opts_def, in nf_ct_test() 123 ct = lookup_fn(ctx, &bpf_tuple, sizeof(bpf_tuple.ipv4), &opts_def, in nf_ct_test() 131 ct = lookup_fn(ctx, &bpf_tuple, sizeof(bpf_tuple.ipv4), &opts_def, in nf_ct_test() 138 ct = lookup_fn(ctx, &bpf_tuple, sizeof(bpf_tuple.ipv4) - 1, &opts_def, in nf_ct_test() 145 bpf_tuple.ipv4.saddr = bpf_get_prandom_u32(); /* src IP */ in nf_ct_test() 146 bpf_tuple.ipv4 in nf_ct_test() [all...] |
H A 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() 623 struct iphdr *ipv4 = (struct iphdr *)iph; fill_tuple() local 739 const struct iphdr *ipv4 = pkt_parse_ipv4(pkt, &_ip4); process_icmpv4() local 859 struct iphdr *ipv4 = pkt_parse_ipv4(pkt, &_ip4); process_ipv4() local [all...] |
H A 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()
|
H A 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()
|
/kernel/linux/linux-6.6/drivers/infiniband/hw/irdma/ |
H A D | trace_cm.h | 15 #define __print_ip_addr(addr, port, ipv4) print_ip_addr(p, addr, port, ipv4) 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) [all...] |
/kernel/linux/linux-5.10/net/ipv4/netfilter/ |
H A 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_pre_exit() 62 arpt_unregister_table_pre_exit(net, net->ipv4.arptable_filter, in arptable_filter_net_pre_exit() 68 if (!net->ipv4.arptable_filter) in arptable_filter_net_exit() 70 arpt_unregister_table(net, net->ipv4.arptable_filter); in arptable_filter_net_exit() 71 net->ipv4.arptable_filter = NULL; in arptable_filter_net_exit()
|
H A 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_pre_exit() 68 ipt_unregister_table_pre_exit(net, net->ipv4.iptable_security, in iptable_security_net_pre_exit() 74 if (!net->ipv4.iptable_security) in iptable_security_net_exit() 76 ipt_unregister_table_exit(net, net->ipv4.iptable_security); in iptable_security_net_exit() 77 net->ipv4.iptable_security = NULL; in iptable_security_net_exit()
|
H A 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_pre_exit() 106 ipt_unregister_table_pre_exit(net, net->ipv4.iptable_mangle, in iptable_mangle_net_pre_exit() 112 if (!net->ipv4.iptable_mangle) in iptable_mangle_net_exit() 114 ipt_unregister_table_exit(net, net->ipv4.iptable_mangle); in iptable_mangle_net_exit() 115 net->ipv4.iptable_mangle = NULL; in iptable_mangle_net_exit()
|
H A 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_pre_exit() 124 if (!net->ipv4.nat_table) in iptable_nat_net_exit() 126 ipt_unregister_table_exit(net, net->ipv4.nat_table); in iptable_nat_net_exit() 127 net->ipv4.nat_table = NULL; in iptable_nat_net_exit()
|
H A 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_pre_exit() 78 ipt_unregister_table_pre_exit(net, net->ipv4.iptable_filter, in iptable_filter_net_pre_exit() 84 if (!net->ipv4.iptable_filter) in iptable_filter_net_exit() 86 ipt_unregister_table_exit(net, net->ipv4.iptable_filter); in iptable_filter_net_exit() 87 net->ipv4.iptable_filter = NULL; in iptable_filter_net_exit()
|
H A 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_pre_exit() 73 ipt_unregister_table_pre_exit(net, net->ipv4.iptable_raw, in iptable_raw_net_pre_exit() 79 if (!net->ipv4.iptable_raw) in iptable_raw_net_exit() 81 ipt_unregister_table_exit(net, net->ipv4.iptable_raw); in iptable_raw_net_exit() 82 net->ipv4.iptable_raw = NULL; in iptable_raw_net_exit()
|
/third_party/ltp/testcases/network/stress/multicast/grp-operation/ |
H A D | mcast-lib.sh | 13 SYSFS_IGMP_MAX_MEMBERSHIPS=$(sysctl -b net.ipv4.igmp_max_memberships) 14 SYSFS_IGMP_MAX_MSF=$(sysctl -b net.ipv4.igmp_max_msf) 15 SYSFS_FORCE_IGMP_VERSION=$(sysctl -b net.ipv4.conf.$(tst_iface).force_igmp_version) 16 SYSFS_ALL_FORCE_IGMP_VERSION=$(sysctl -b net.ipv4.conf.all.force_igmp_version) 19 "\$1 shouldn't be set higher than 5459 as it's used to set /proc/sys/net/ipv4/igmp_max_memberships" 21 ROD sysctl -q -w net.ipv4.igmp_max_memberships=$igmp_max_memberships 22 ROD sysctl -q -w net.ipv4.igmp_max_msf=10 23 ROD sysctl -q -w net.ipv4.conf.$(tst_iface).force_igmp_version=0 24 ROD sysctl -q -w net.ipv4.conf.all.force_igmp_version=0 69 [ -n "$SYSFS_IGMP_MAX_MEMBERSHIPS" ] && sysctl -q -w net.ipv4 [all...] |
/kernel/linux/linux-5.10/tools/testing/selftests/netfilter/ |
H A D | ipvs.sh | 47 sysipvsnet="/proc/sys/net/ipv4/vs/" 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 [all...] |
/kernel/linux/linux-6.6/tools/testing/selftests/netfilter/ |
H A D | ipvs.sh | 47 sysipvsnet="/proc/sys/net/ipv4/vs/" 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 [all...] |
/kernel/linux/linux-5.10/tools/testing/selftests/net/forwarding/ |
H A 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 [all...] |
/kernel/linux/linux-6.6/tools/testing/selftests/net/forwarding/ |
H A 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 [all...] |