]> Git Repo - linux.git/blob - tools/testing/selftests/net/forwarding/ip6gre_flat_keys.sh
x86/kaslr: Expose and use the end of the physical memory address space
[linux.git] / tools / testing / selftests / net / forwarding / ip6gre_flat_keys.sh
1 #!/bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3
4 # Test IP-in-IP GRE tunnel with keys.
5 # This test uses flat topology for IP tunneling tests. See ip6gre_lib.sh for
6 # more details.
7
8 ALL_TESTS="
9         gre_flat
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_flat_create $ol1 $ul1 ikey 111 okey 222
33         sw2_flat_create $ol2 $ul2 ikey 222 okey 111
34 }
35
36 gre_flat()
37 {
38         test_traffic_ip4ip6 "GRE flat IPv4-in-IPv6 with ikey/okey"
39         test_traffic_ip6ip6 "GRE flat IPv6-in-IPv6 with ikey/okey"
40 }
41
42 gre_mtu_change()
43 {
44         test_mtu_change gre
45 }
46
47 cleanup()
48 {
49         pre_cleanup
50
51         sw2_flat_destroy $ol2 $ul2
52         sw1_flat_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.03575 seconds and 4 git commands to generate.