brintos

brintos / linux-shallow public Read only

0
0
Text · 1.3 KiB · e084449 Raw
80 lines · bash
1#!/bin/bash2# SPDX-License-Identifier: GPL-2.03 4# Test IP-in-IP GRE tunnels without key.5# This test uses hierarchical topology for IP tunneling tests. See6# ip6gre_lib.sh for more details.7 8ALL_TESTS="9	gre_hier10	gre_mtu_change11	gre_hier_remote_change12"13 14NUM_NETIFS=615source lib.sh16source ip6gre_lib.sh17 18setup_prepare()19{20	h1=${NETIFS[p1]}21	ol1=${NETIFS[p2]}22 23	ul1=${NETIFS[p3]}24	ul2=${NETIFS[p4]}25 26	ol2=${NETIFS[p5]}27	h2=${NETIFS[p6]}28 29	forwarding_enable30	vrf_prepare31	h1_create32	h2_create33	sw1_hierarchical_create $ol1 $ul134	sw2_hierarchical_create $ol2 $ul235}36 37gre_hier()38{39	test_traffic_ip4ip6 "GRE hierarchical IPv4-in-IPv6"40	test_traffic_ip6ip6 "GRE hierarchical IPv6-in-IPv6"41}42 43gre_mtu_change()44{45	test_mtu_change gre46}47 48gre_hier_remote_change()49{50	hier_remote_change51 52	test_traffic_ip4ip6 "GRE hierarchical IPv4-in-IPv6 (new remote)"53	test_traffic_ip6ip6 "GRE hierarchical IPv6-in-IPv6 (new remote)"54 55	hier_remote_restore56 57	test_traffic_ip4ip6 "GRE hierarchical IPv4-in-IPv6 (old remote)"58	test_traffic_ip6ip6 "GRE hierarchical IPv6-in-IPv6 (old remote)"59}60 61cleanup()62{63	pre_cleanup64 65	sw2_hierarchical_destroy $ol2 $ul266	sw1_hierarchical_destroy $ol1 $ul167	h2_destroy68	h1_destroy69	vrf_cleanup70	forwarding_restore71}72 73trap cleanup EXIT74 75setup_prepare76setup_wait77tests_run78 79exit $EXIT_STATUS80