]> Git Repo - linux.git/blob - tools/testing/selftests/net/forwarding/ip6gre_hier.sh
x86/kaslr: Expose and use the end of the physical memory address space
[linux.git] / tools / testing / selftests / net / forwarding / ip6gre_hier.sh
1 #!/bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3
4 # Test IP-in-IP GRE tunnels without key.
5 # This test uses hierarchical topology for IP tunneling tests. See
6 # ip6gre_lib.sh for more details.
7
8 ALL_TESTS="
9         gre_hier
10         gre_mtu_change
11 "
12
13 NUM_NETIFS=6
14 source lib.sh
15 source ip6gre_lib.sh
16
17 setup_prepare()
18 {
19         h1=${NETIFS[p1]}
20         ol1=${NETIFS[p2]}
21
22         ul1=${NETIFS[p3]}
23         ul2=${NETIFS[p4]}
24
25         ol2=${NETIFS[p5]}
26         h2=${NETIFS[p6]}
27
28         forwarding_enable
29         vrf_prepare
30         h1_create
31         h2_create
32         sw1_hierarchical_create $ol1 $ul1
33         sw2_hierarchical_create $ol2 $ul2
34 }
35
36 gre_hier()
37 {
38         test_traffic_ip4ip6 "GRE hierarchical IPv4-in-IPv6"
39         test_traffic_ip6ip6 "GRE hierarchical IPv6-in-IPv6"
40 }
41
42 gre_mtu_change()
43 {
44         test_mtu_change gre
45 }
46
47 cleanup()
48 {
49         pre_cleanup
50
51         sw2_hierarchical_destroy $ol2 $ul2
52         sw1_hierarchical_destroy $ol1 $ul1
53         h2_destroy
54         h1_destroy
55         vrf_cleanup
56         forwarding_restore
57 }
58
59 trap cleanup EXIT
60
61 setup_prepare
62 setup_wait
63 tests_run
64
65 exit $EXIT_STATUS
This page took 0.029691 seconds and 4 git commands to generate.