2 # SPDX-License-Identifier: GPL-2.0
4 ALL_TESTS
="ping_ipv4 ping_ipv6"
11 ip link
set dev vrf-h1 up
13 ip link
set dev
$h1 up
14 vlan_create
$h1 1 vrf-h1
192.0.2.2/24 2001:db8
:1::2/64
16 ip route add
198.51.100.0/24 vrf vrf-h1 nexthop via
192.0.2.1
17 ip route add
2001:db8
:2::/64 vrf vrf-h1 nexthop via
2001:db8
:1::1
22 ip route del
2001:db8
:2::/64 vrf vrf-h1
23 ip route del
198.51.100.0/24 vrf vrf-h1
26 ip link
set dev
$h1 down
28 ip link
set dev vrf-h1 down
35 ip link
set dev vrf-h2 up
37 ip link
set dev
$h2 up
38 vlan_create
$h2 1 vrf-h2
198.51.100.2/24 2001:db8
:2::2/64
40 ip route add
192.0.2.0/24 vrf vrf-h2 nexthop via
198.51.100.1
41 ip route add
2001:db8
:1::/64 vrf vrf-h2 nexthop via
2001:db8
:2::1
46 ip route del
2001:db8
:1::/64 vrf vrf-h2
47 ip route del
192.0.2.0/24 vrf vrf-h2
50 ip link
set dev
$h2 down
52 ip link
set dev vrf-h2 down
58 ip link
set dev
$rp1 up
59 ip link add link
$rp1 name
$rp1.1 up
type vlan id
1
61 ip address add
192.0.2.1/24 dev
$rp1.1
62 ip address add
2001:db8
:1::1/64 dev
$rp1.1
64 ip link
set dev
$rp2 up
65 ip link add link
$rp2 name
$rp2.1 up
type vlan id
1
67 ip address add
198.51.100.1/24 dev
$rp2.1
68 ip address add
2001:db8
:2::1/64 dev
$rp2.1
73 ip address del
2001:db8
:2::1/64 dev
$rp2.1
74 ip address del
198.51.100.1/24 dev
$rp2.1
76 ip link del dev
$rp2.1
77 ip link
set dev
$rp2 down
79 ip address del
2001:db8
:1::1/64 dev
$rp1.1
80 ip address del
192.0.2.1/24 dev
$rp1.1
82 ip link del dev
$rp1.1
83 ip link
set dev
$rp1 down
120 ping_test
$h1.1
198.51.100.2
125 ping6_test
$h1.1
2001:db8
:2::2