xref: /aosp_15_r20/external/ltp/testcases/network/mpls/mpls03.sh (revision 49cdfc7efb34551c7342be41a7384b9c40d7cab7)
1*49cdfc7eSAndroid Build Coastguard Worker#!/bin/sh
2*49cdfc7eSAndroid Build Coastguard Worker# SPDX-License-Identifier: GPL-2.0-or-later
3*49cdfc7eSAndroid Build Coastguard Worker# Copyright (c) 2018 Oracle and/or its affiliates. All Rights Reserved.
4*49cdfc7eSAndroid Build Coastguard Worker
5*49cdfc7eSAndroid Build Coastguard WorkerTST_SETUP="setup"
6*49cdfc7eSAndroid Build Coastguard WorkerTST_TESTFUNC="mpls_virt_test"
7*49cdfc7eSAndroid Build Coastguard WorkerTST_CLEANUP="mpls_virt_cleanup"
8*49cdfc7eSAndroid Build Coastguard Worker
9*49cdfc7eSAndroid Build Coastguard Workersetup()
10*49cdfc7eSAndroid Build Coastguard Worker{
11*49cdfc7eSAndroid Build Coastguard Worker	virt_type="gre"
12*49cdfc7eSAndroid Build Coastguard Worker	if [ -n "$TST_IPV6" ]; then
13*49cdfc7eSAndroid Build Coastguard Worker		tst_kvcmp -lt "4.19" && \
14*49cdfc7eSAndroid Build Coastguard Worker			tst_brk TCONF "mpls + ip6gre requires kernel 4.19+"
15*49cdfc7eSAndroid Build Coastguard Worker		virt_type="ip6gre"
16*49cdfc7eSAndroid Build Coastguard Worker	fi
17*49cdfc7eSAndroid Build Coastguard Worker
18*49cdfc7eSAndroid Build Coastguard Worker	mpls_virt_setup
19*49cdfc7eSAndroid Build Coastguard Worker}
20*49cdfc7eSAndroid Build Coastguard Worker
21*49cdfc7eSAndroid Build Coastguard Worker. virt_lib.sh
22*49cdfc7eSAndroid Build Coastguard Worker. mpls_lib.sh
23*49cdfc7eSAndroid Build Coastguard Workertst_run
24