brintos

brintos / linux-shallow public Read only

0
0
Text · 1.2 KiB · e533511 Raw
80 lines · bash
1#!/bin/bash2# SPDX-License-Identifier: GPL-2.03 4# Test IP-in-IP GRE tunnel with key.5# This test uses flat topology for IP tunneling tests. See ip6gre_lib.sh for6# more details.7 8ALL_TESTS="9	gre_flat10	gre_mtu_change11	gre_flat_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_flat_create $ol1 $ul1 key 23334	sw2_flat_create $ol2 $ul2 key 23335}36 37gre_flat()38{39	test_traffic_ip4ip6 "GRE flat IPv4-in-IPv6 with key"40	test_traffic_ip6ip6 "GRE flat IPv6-in-IPv6 with key"41}42 43gre_mtu_change()44{45	test_mtu_change46}47 48gre_flat_remote_change()49{50	flat_remote_change51 52	test_traffic_ip4ip6 "GRE flat IPv4-in-IPv6 with key (new remote)"53	test_traffic_ip6ip6 "GRE flat IPv6-in-IPv6 with key (new remote)"54 55	flat_remote_restore56 57	test_traffic_ip4ip6 "GRE flat IPv4-in-IPv6 with key (old remote)"58	test_traffic_ip6ip6 "GRE flat IPv6-in-IPv6 with key (old remote)"59}60 61cleanup()62{63	pre_cleanup64 65	sw2_flat_destroy $ol2 $ul266	sw1_flat_destroy $ol1 $ul167	h2_destroy68	h1_destroy69	vrf_cleanup70	forwarding_restore71}72 73trap cleanup EXIT74 75setup_prepare76setup_wait77tests_run78 79exit $EXIT_STATUS80