/
usr
/
src
/
linux-headers-5.15.0-190
/
tools
/
testing
/
selftests
/
net
/
forwarding
/
/usr/src/linux-headers-5.15.0-190/tools/testing/selftests/net/forwarding
mkdir
upload
Name
Size
Mode
Actions
bridge_igmp.sh
15152
0755
edit
dl
rm
bridge_mld.sh
16563
0755
edit
dl
rm
bridge_port_isolation.sh
2378
0755
edit
dl
rm
bridge_sticky_fdb.sh
1159
0755
edit
dl
rm
bridge_vlan_aware.sh
2524
0755
edit
dl
rm
bridge_vlan_unaware.sh
1248
0755
edit
dl
rm
custom_multipath_hash.sh
9993
0755
edit
dl
rm
devlink_lib.sh
13118
0644
edit
dl
rm
dual_vxlan_bridge.sh
11439
0755
edit
dl
rm
ethtool.sh
6745
0755
edit
dl
rm
ethtool_extended_state.sh
1923
0755
edit
dl
rm
ethtool_lib.sh
2815
0644
edit
dl
rm
fib_offload_lib.sh
25157
0644
edit
dl
rm
gre_custom_multipath_hash.sh
12768
0755
edit
dl
rm
gre_inner_v4_multipath.sh
7730
0755
edit
dl
rm
gre_inner_v6_multipath.sh
7843
0755
edit
dl
rm
gre_multipath.sh
6439
0755
edit
dl
rm
gre_multipath_nh.sh
9301
0755
edit
dl
rm
gre_multipath_nh_res.sh
9491
0755
edit
dl
rm
ip6gre_custom_multipath_hash.sh
13038
0755
edit
dl
rm
ip6gre_inner_v4_multipath.sh
7956
0755
edit
dl
rm
ip6gre_inner_v6_multipath.sh
8069
0755
edit
dl
rm
ip6_forward_instats_vrf.sh
3092
0755
edit
dl
rm
ipip_flat_gre.sh
838
0755
edit
dl
rm
ipip_flat_gre_key.sh
860
0755
edit
dl
rm
ipip_flat_gre_keys.sh
886
0755
edit
dl
rm
ipip_hier_gre.sh
887
0755
edit
dl
rm
ipip_hier_gre_key.sh
910
0755
edit
dl
rm
ipip_hier_gre_keys.sh
938
0755
edit
dl
rm
ipip_lib.sh
8557
0644
edit
dl
rm
lib.sh
28668
0644
edit
dl
rm
loopback.sh
1589
0755
edit
dl
rm
Makefile
1718
0644
edit
dl
rm
mirror_gre.sh
3366
0755
edit
dl
rm
mirror_gre_bound.sh
5929
0755
edit
dl
rm
mirror_gre_bridge_1d.sh
4504
0755
edit
dl
rm
mirror_gre_bridge_1d_vlan.sh
2717
0755
edit
dl
rm
mirror_gre_bridge_1q.sh
4380
0755
edit
dl
rm
mirror_gre_bridge_1q_lag.sh
7485
0755
edit
dl
rm
mirror_gre_changes.sh
5824
0755
edit
dl
rm
mirror_gre_flower.sh
2891
0755
edit
dl
rm
mirror_gre_lag_lacp.sh
7458
0755
edit
dl
rm
mirror_gre_lib.sh
2565
0644
edit
dl
rm
mirror_gre_neigh.sh
2338
0755
edit
dl
rm
mirror_gre_nh.sh
2974
0755
edit
dl
rm
mirror_gre_topo_lib.sh
3524
0644
edit
dl
rm
mirror_gre_vlan.sh
1715
0755
edit
dl
rm
mirror_gre_vlan_bridge_1q.sh
9117
0755
edit
dl
rm
mirror_lib.sh
2964
0644
edit
dl
rm
mirror_topo_lib.sh
2758
0644
edit
dl
rm
mirror_vlan.sh
2303
0755
edit
dl
rm
pedit_dsfield.sh
6789
0755
edit
dl
rm
pedit_l4port.sh
4564
0755
edit
dl
rm
q_in_vni.sh
10926
0755
edit
dl
rm
router.sh
6322
0755
edit
dl
rm
router_bridge.sh
1794
0755
edit
dl
rm
router_bridge_vlan.sh
2108
0755
edit
dl
rm
router_broadcast.sh
5142
0755
edit
dl
rm
router_mpath_nh.sh
9828
0755
edit
dl
rm
router_mpath_nh_res.sh
10223
0755
edit
dl
rm
router_multicast.sh
11597
0755
edit
dl
rm
router_multipath.sh
8449
0755
edit
dl
rm
router_nh.sh
2627
0755
edit
dl
rm
router_vid_1.sh
2153
0755
edit
dl
rm
sch_ets.sh
781
0755
edit
dl
rm
sch_ets_core.sh
7456
0644
edit
dl
rm
sch_ets_tests.sh
4044
0644
edit
dl
rm
sch_red.sh
11358
0755
edit
dl
rm
sch_tbf_core.sh
5140
0644
edit
dl
rm
sch_tbf_ets.sh
118
0755
edit
dl
rm
sch_tbf_etsprio.sh
711
0644
edit
dl
rm
sch_tbf_prio.sh
118
0755
edit
dl
rm
sch_tbf_root.sh
422
0755
edit
dl
rm
skbedit_priority.sh
3901
0755
edit
dl
rm
tc_actions.sh
6606
0755
edit
dl
rm
tc_chains.sh
4945
0755
edit
dl
rm
tc_common.sh
524
0644
edit
dl
rm
tc_flower.sh
21752
0755
edit
dl
rm
tc_flower_router.sh
3096
0755
edit
dl
rm
tc_mpls_l2vpn.sh
5146
0755
edit
dl
rm
tc_police.sh
12111
0755
edit
dl
rm
tc_shblocks.sh
2748
0755
edit
dl
rm
tc_vlan_modify.sh
3246
0755
edit
dl
rm
vxlan_asymmetric.sh
17978
0755
edit
dl
rm
vxlan_bridge_1d.sh
21064
0755
edit
dl
rm
vxlan_bridge_1d_port_8472.sh
172
0755
edit
dl
rm
vxlan_bridge_1q.sh
24053
0755
edit
dl
rm
vxlan_bridge_1q_port_8472.sh
172
0755
edit
dl
rm
vxlan_symmetric.sh
18488
0755
edit
dl
rm
Edit:
/usr/src/linux-headers-5.15.0-190/tools/testing/selftests/net/forwarding/mirror_gre_nh.sh
(2974B)
#!/bin/bash # SPDX-License-Identifier: GPL-2.0 # This test uses standard topology for testing gretap. See # mirror_gre_topo_lib.sh for more details. # # Test that gretap and ip6gretap mirroring works when the other tunnel endpoint # is reachable through a next-hop route (as opposed to directly-attached route). ALL_TESTS=" test_gretap test_ip6gretap " NUM_NETIFS=6 source lib.sh source mirror_lib.sh source mirror_gre_lib.sh source mirror_gre_topo_lib.sh setup_prepare() { h1=${NETIFS[p1]} swp1=${NETIFS[p2]} swp2=${NETIFS[p3]} h2=${NETIFS[p4]} swp3=${NETIFS[p5]} h3=${NETIFS[p6]} sysctl_set net.ipv4.conf.all.rp_filter 0 sysctl_set net.ipv4.conf.$h3.rp_filter 0 vrf_prepare mirror_gre_topo_create sysctl_set net.ipv4.conf.v$h3.rp_filter 0 ip address add dev $swp3 192.0.2.161/28 ip address add dev $h3 192.0.2.162/28 ip address add dev gt4 192.0.2.129/32 ip address add dev h3-gt4 192.0.2.130/32 # IPv6 route can't be added after address. Such routes are rejected due # to the gateway address having been configured on the local system. It # works the other way around though. ip address add dev $swp3 2001:db8:4::1/64 ip -6 route add 2001:db8:2::2/128 via 2001:db8:4::2 ip address add dev $h3 2001:db8:4::2/64 ip address add dev gt6 2001:db8:2::1 ip address add dev h3-gt6 2001:db8:2::2 } cleanup() { pre_cleanup ip -6 route del 2001:db8:2::2/128 via 2001:db8:4::2 ip address del dev $h3 2001:db8:4::2/64 ip address del dev $swp3 2001:db8:4::1/64 ip address del dev $h3 192.0.2.162/28 ip address del dev $swp3 192.0.2.161/28 sysctl_restore net.ipv4.conf.v$h3.rp_filter 0 mirror_gre_topo_destroy vrf_cleanup sysctl_restore net.ipv4.conf.$h3.rp_filter sysctl_restore net.ipv4.conf.all.rp_filter } test_gretap() { RET=0 mirror_install $swp1 ingress gt4 "matchall $tcflags" # For IPv4, test that there's no mirroring without the route directing # the traffic to tunnel remote address. Then add it and test that # mirroring starts. For IPv6 we can't test this due to the limitation # that routes for locally-specified IPv6 addresses can't be added. fail_test_span_gre_dir gt4 ingress ip route add 192.0.2.130/32 via 192.0.2.162 quick_test_span_gre_dir gt4 ingress ip route del 192.0.2.130/32 via 192.0.2.162 mirror_uninstall $swp1 ingress log_test "mirror to gre with next-hop remote ($tcflags)" } test_ip6gretap() { RET=0 mirror_install $swp1 ingress gt6 "matchall $tcflags" quick_test_span_gre_dir gt6 ingress mirror_uninstall $swp1 ingress log_test "mirror to ip6gre with next-hop remote ($tcflags)" } test_all() { slow_path_trap_install $swp1 ingress slow_path_trap_install $swp1 egress tests_run slow_path_trap_uninstall $swp1 egress slow_path_trap_uninstall $swp1 ingress } trap cleanup EXIT setup_prepare setup_wait tcflags="skip_hw" test_all if ! tc_offload_check; then echo "WARN: Could not test offloaded functionality" else tcflags="skip_sw" test_all fi exit $EXIT_STATUS
Save
cmd:
run