| # SPDX-License-Identifier: GPL-2.0 |
| ip link add veth0 type veth peer name veth0b |
| ip link set veth0 netns at_ns0 |
| ip netns exec at_ns0 ip addr add 172.16.1.100/24 dev veth0 |
| ip netns exec at_ns0 ip addr add 2401:db00::1/64 dev veth0 nodad |
| ip netns exec at_ns0 ip link set dev veth0 up |
| ip addr add 172.16.1.101/24 dev veth0b |
| ip addr add 2401:db00::2/64 dev veth0b nodad |
| mount -t cgroup2 none /tmp/cgroupv2 |
| mkdir -p /tmp/cgroupv2/foo |
| echo $$ >> /tmp/cgroupv2/foo/cgroup.procs |
| test_cgrp2_sock2 /tmp/cgroupv2/foo sock_flags_kern.o $1 |
| ping -c1 -w1 172.16.1.100 |
| echo "ping failed when it should succeed" |
| ping6 -c1 -w1 2401:db00::1 |
| echo "ping6 succeeded when it should not" |
| ping6 -c1 -w1 2401:db00::1 |
| echo "ping6 failed when it should succeed" |
| ping -c1 -w1 172.16.1.100 |
| echo "ping succeeded when it should not" |