/tools/testing/selftests/bpf/progs/ |
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 ? sizeof(tuple->ipv4) : sizeof(tuple->ipv6); in handle_tcp() 154 dport = ipv4 ? tuple->ipv4.dport : tuple->ipv6.dport; in handle_tcp() 177 bool ipv4 = false; in bpf_sk_assign_test() local [all …]
|
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()
|
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() 227 return ipv4; in pkt_parse_ipv4() [all …]
|
D | test_sk_lookup_kern.c | 24 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()
|
D | test_tcp_check_syncookie_kern.c | 77 tup.ipv4.saddr = ipv4h->saddr; in check_syncookie() 78 tup.ipv4.daddr = ipv4h->daddr; in check_syncookie() 79 tup.ipv4.sport = tcph->source; in check_syncookie() 80 tup.ipv4.dport = tcph->dest; in check_syncookie() 82 sk = bpf_skc_lookup_tcp(ctx, &tup, sizeof(tup.ipv4), in check_syncookie()
|
/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
|
D | reuseaddr_ports_exhausted.sh | 17 sysctl -w net.ipv4.ip_local_port_range="32768 32768" \ 20 sysctl -w net.ipv4.ip_autobind_reuse=1 > /dev/null 2>&1
|
D | ip_defrag.sh | 17 ip netns exec "${NETNS}" sysctl -w net.ipv4.ipfrag_high_thresh=9000000 >/dev/null 2>&1 18 ip netns exec "${NETNS}" sysctl -w net.ipv4.ipfrag_low_thresh=7000000 >/dev/null 2>&1 19 ip netns exec "${NETNS}" sysctl -w net.ipv4.ipfrag_time=1 >/dev/null 2>&1
|
D | fib_rule_tests.sh | 192 ip netns exec testns sysctl -w net.ipv4.ip_forward=1 193 ip netns exec testns sysctl -w net.ipv4.conf.$DEV.rp_filter=0 196 ip netns exec testns sysctl -w net.ipv4.ip_forward=0
|
D | tcp_fastopen_backup_key.sh | 15 ip netns exec "${NETNS}" sysctl -w net.ipv4.tcp_fastopen=3 \
|
/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 …]
|
D | bridge_brouter.sh | 65 …ip netns exec ns0 ebtables -t broute -A BROUTING -p ipv4 --ip-protocol icmp -j redirect --redirect… 82 ip netns exec ns0 sysctl -q net.ipv4.conf.veth0.forwarding=1 83 ip netns exec ns0 sysctl -q net.ipv4.conf.veth1.forwarding=1 103 ip netns exec ns0 ebtables -t filter -A FORWARD -p ipv4 --ip-protocol icmp -j DROP 113 …ip netns exec ns0 ebtables -t broute -A BROUTING -p ipv4 --ip-protocol icmp -j redirect --redirect…
|
D | nft_flowtable.sh | 130 ip netns exec nsr$i sysctl net.ipv4.conf.veth0.forwarding=1 > /dev/null 131 ip netns exec nsr$i sysctl net.ipv4.conf.veth1.forwarding=1 > /dev/null 139 if ! ip netns exec ns$i sysctl net.ipv4.tcp_no_metrics_save=1 > /dev/null; then 145 ip netns exec ns$i sysctl net.ipv4.ip_no_pmtu_disc=1 > /dev/null 188 meta nfproto ipv4 meta l4proto icmp accept 363 ip netns exec ns1 sysctl net.ipv4.ip_no_pmtu_disc=0 > /dev/null 364 ip netns exec ns2 sysctl net.ipv4.ip_no_pmtu_disc=0 > /dev/null
|
D | conntrack_vrf.sh | 71 ip netns exec $ns0 sysctl -q -w net.ipv4.conf.default.rp_filter=0 72 ip netns exec $ns0 sysctl -q -w net.ipv4.conf.all.rp_filter=0 73 ip netns exec $ns0 sysctl -q -w net.ipv4.conf.all.rp_filter=0
|
D | nft_meta.sh | 58 meta nfproto ipv4 counter name "infproto4count" 72 meta nfproto ipv4 counter name "onfproto4count"
|
/tools/testing/selftests/net/forwarding/ |
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 | 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
|
D | router.sh | 176 sysctl_set net.ipv4.conf.all.rp_filter 0 177 sysctl_set net.ipv4.conf.$rp1.rp_filter 0 191 sysctl_restore net.ipv4.conf.$rp1.rp_filter 192 sysctl_restore net.ipv4.conf.all.rp_filter 254 sysctl_set net.ipv4.conf.all.rp_filter 0 255 sysctl_set net.ipv4.conf.$rp1.rp_filter 0 269 sysctl_restore net.ipv4.conf.$rp1.rp_filter 270 sysctl_restore net.ipv4.conf.all.rp_filter
|
D | mirror_gre_vlan_bridge_1q.sh | 89 sysctl_set net.ipv4.conf.all.rp_filter 0 90 sysctl_set net.ipv4.conf.$h3.rp_filter 0 122 sysctl_restore net.ipv4.conf.$h3.rp_filter 123 sysctl_restore net.ipv4.conf.all.rp_filter
|
D | vxlan_asymmetric.sh | 219 sysctl_set net.ipv4.conf.all.rp_filter 0 220 sysctl_set net.ipv4.conf.vlan10-v.rp_filter 0 221 sysctl_set net.ipv4.conf.vlan20-v.rp_filter 0 226 sysctl_restore net.ipv4.conf.all.rp_filter 369 sysctl_set net.ipv4.conf.all.rp_filter 0 370 sysctl_set net.ipv4.conf.vlan10-v.rp_filter 0 371 sysctl_set net.ipv4.conf.vlan20-v.rp_filter 0
|
/tools/testing/selftests/bpf/ |
D | test_tcp_check_syncookie.sh | 39 ns1_exec sysctl -w net.ipv4.tcp_syncookies=2 40 ns1_exec sysctl -w net.ipv4.tcp_window_scaling=0 41 ns1_exec sysctl -w net.ipv4.tcp_timestamps=0 42 ns1_exec sysctl -w net.ipv4.tcp_sack=0
|
D | test_tc_tunnel.sh | 100 $0 ipv4 ipip none 100 110 $0 ipv4 gre $mac 100 116 $0 ipv4 gre $mac 2000 122 $0 ipv4 udp $mac 100 128 $0 ipv4 udp $mac 2000 257 ip netns exec "${ns2}" sysctl -qw net.ipv4.conf.lo.rp_filter=0 264 ip netns exec "${ns2}" sysctl -qw net.ipv4.conf.all.rp_filter=0 267 ip netns exec "${ns2}" sysctl -qw net.ipv4.conf.testtun0.rp_filter=0
|
D | test_flow_dissector.sh | 102 echo 0 > /proc/sys/net/ipv4/conf/default/rp_filter 103 echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter 104 echo 0 > /proc/sys/net/ipv4/conf/lo/rp_filter
|
/tools/testing/selftests/drivers/net/mlxsw/ |
D | qos_dscp_router.sh | 144 sysctl_set net.ipv4.ip_forward_update_priority 1 157 sysctl_restore net.ipv4.ip_forward_update_priority 228 sysctl_restore net.ipv4.ip_forward_update_priority 229 sysctl_set net.ipv4.ip_forward_update_priority $update
|
/tools/usb/usbip/src/ |
D | usbipd.c | 491 static int do_standalone_mode(int daemonize, int ipv4, int ipv6) in do_standalone_mode() argument 523 if (ipv4 && ipv6) in do_standalone_mode() 525 else if (ipv4) in do_standalone_mode() 609 int ipv4 = 0, ipv6 = 0; in main() local 630 ipv4 = 1; in main() 663 if (!ipv4 && !ipv6) in main() 664 ipv4 = ipv6 = 1; in main() 668 rc = do_standalone_mode(daemonize, ipv4, ipv6); in main()
|