Home
last modified time | relevance | path

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

12345678910>>...12

/kernel/linux/linux-5.10/net/ipv4/
Dsysctl_net_ipv4.c62 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] < net->ipv4.sysctl_ip_prot_sock)) in ipv4_local_port_range()
112 ipv4.sysctl_ip_prot_sock); in ipv4_privileged_ports()
124 pports = net->ipv4.sysctl_ip_prot_sock; in ipv4_privileged_ports()
[all …]
Dtcp_fastopen.c19 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 …]
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()
Dtcp_ipv4.c112 int reuse = 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()
795 ctl_sk = this_cpu_read(*net->ipv4.tcp_sk); in tcp_v4_send_reset()
893 ctl_sk = this_cpu_read(*net->ipv4.tcp_sk); in tcp_v4_send_ack()
986 tos = sock_net(sk)->ipv4.sysctl_tcp_reflect_tos ? in tcp_v4_send_synack()
1561 if (sock_net(sk)->ipv4.sysctl_tcp_reflect_tos) in tcp_v4_syn_recv_sock()
2808 .sysctl_wmem_offset = offsetof(struct net, ipv4.sysctl_tcp_wmem),
2809 .sysctl_rmem_offset = offsetof(struct net, ipv4.sysctl_tcp_rmem),
2825 if (net->ipv4.tcp_congestion_control) in tcp_sk_exit()
2826 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 …]
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/progs/
Dtest_sk_assign.c44 get_tuple(struct __sk_buff *skb, bool *ipv4, bool *tcp) in get_tuple() argument
68 *ipv4 = true; in get_tuple()
77 *ipv4 = false; in get_tuple()
91 handle_udp(struct __sk_buff *skb, struct bpf_sock_tuple *tuple, bool ipv4) in handle_udp() argument
100 tuple_len = ipv4 ? sizeof(tuple->ipv4) : sizeof(tuple->ipv6); in handle_udp()
108 dport = ipv4 ? tuple->ipv4.dport : tuple->ipv6.dport; in handle_udp()
123 handle_tcp(struct __sk_buff *skb, struct bpf_sock_tuple *tuple, bool ipv4) in handle_tcp() argument
132 tuple_len = ipv4 ? sizeof(tuple->ipv4) : sizeof(tuple->ipv6); in handle_tcp()
143 dport = ipv4 ? tuple->ipv4.dport : tuple->ipv6.dport; in handle_tcp()
166 bool ipv4 = false; in bpf_sk_assign_test() local
[all …]
Dtest_cls_redirect.c90 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()
227 return ipv4; in pkt_parse_ipv4()
[all …]
Dconnect4_prog.c154 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()
Dtest_sk_lookup_kern.c24 bool *ipv4) in get_tuple() argument
37 *ipv4 = true; in get_tuple()
46 *ipv4 = true; in get_tuple()
65 bool ipv4; in bpf_sk_lookup_test0() local
70 tuple = get_tuple(data, sizeof(*eth), data_end, eth->h_proto, &ipv4); in bpf_sk_lookup_test0()
74 tuple_len = ipv4 ? sizeof(tuple->ipv4) : sizeof(tuple->ipv6); in bpf_sk_lookup_test0()
/kernel/linux/linux-5.10/net/ipv4/netfilter/
Darptable_filter.c37 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()
Diptable_security.c43 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()
Diptable_filter.c37 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()
Diptable_nat.c33 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()
Diptable_raw.c44 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()
Diptable_mangle.c56 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()
/kernel/linux/linux-5.10/tools/testing/selftests/netfilter/
Dipvs.sh141 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 …]
/kernel/linux/linux-5.10/tools/testing/selftests/net/forwarding/
Drouter_broadcast.sh146 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 …]
Dmirror_gre_nh.sh32 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
/kernel/linux/linux-5.10/tools/testing/selftests/net/
Droute_localnet.sh16 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
/kernel/linux/linux-5.10/drivers/infiniband/hw/usnic/
Dusnic_fwd.h115 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()
/kernel/linux/linux-5.10/samples/bpf/
Dtc_l2_redirect.sh10 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 …]
/kernel/linux/linux-5.10/drivers/infiniband/hw/ocrdma/
Docrdma_ah.c83 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()
/kernel/linux/linux-5.10/drivers/infiniband/core/
Duverbs_std_types_flow_action.c122 const struct ib_uverbs_flow_ipv4_filter ipv4 = { in parse_esp_ip() local
141 struct ib_uverbs_flow_ipv4_filter ipv4; in parse_esp_ip() member
151 sizeof(ipv4.flags) != sizeof(ipv4)); in parse_esp_ip()
157 if (len > sizeof(user_val.ipv4) && in parse_esp_ip()
158 !ib_is_buffer_cleared(val_ptr + sizeof(user_val.ipv4), in parse_esp_ip()
159 len - sizeof(user_val.ipv4))) in parse_esp_ip()
162 val_len = min_t(size_t, len, sizeof(user_val.ipv4)); in parse_esp_ip()
163 ret = copy_from_user(&user_val.ipv4, val_ptr, in parse_esp_ip()
168 user_pmask = &ipv4; in parse_esp_ip()
/kernel/linux/linux-5.10/Documentation/security/
DSCTP.rst39 Passes one or more ipv4/ipv6 addresses to the security module for validation
47 @address - One or more ipv4 / ipv6 addresses.
49 ipv4 or ipv6 address using sizeof(struct sockaddr_in) or
56 | SCTP_SOCKOPT_BINDX_ADD | One or more ipv4 / ipv6 addresses |
57 | SCTP_PRIMARY_ADDR | Single ipv4 or ipv6 address |
58 | SCTP_SET_PEER_PRIMARY_ADDR | Single ipv4 or ipv6 address |
65 | SCTP_SOCKOPT_CONNECTX | One or more ipv4 / ipv6 addresses |
66 | SCTP_PARAM_ADD_IP | One or more ipv4 / ipv6 addresses |
67 | SCTP_SENDMSG_CONNECT | Single ipv4 or ipv6 address |
68 | SCTP_PARAM_SET_PRIMARY | Single ipv4 or ipv6 address |
[all …]

12345678910>>...12