1#!/bin/bash 2# SPDX-License-Identifier: GPL-2.0 3 4# Test IP-in-IP GRE tunnel without key. 5# This test uses flat topology for IP tunneling tests. See ip6gre_lib.sh for 6# more details. 7 8ALL_TESTS=" 9 gre_flat 10 gre_mtu_change 11" 12 13NUM_NETIFS=6 14source lib.sh 15source ip6gre_lib.sh 16 17setup_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 33 sw2_flat_create $ol2 $ul2 34} 35 36gre_flat() 37{ 38 test_traffic_ip4ip6 "GRE flat IPv4-in-IPv6" 39 test_traffic_ip6ip6 "GRE flat IPv6-in-IPv6" 40} 41 42gre_mtu_change() 43{ 44 test_mtu_change 45} 46 47cleanup() 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 59trap cleanup EXIT 60 61setup_prepare 62setup_wait 63tests_run 64 65exit $EXIT_STATUS 66