2 # SPDX-License-Identifier: GPL-2.0
4 # Run tests when all ephemeral ports are exhausted.
6 # Author: Kuniyuki Iwashima <kuniyu@amazon.co.jp>
11 readonly NETNS
="ns-$(mktemp -u XXXXXX)"
14 ip netns add
"${NETNS}"
15 ip
-netns "${NETNS}" link
set lo up
16 ip netns
exec "${NETNS}" \
17 sysctl
-w net.ipv4.ip_local_port_range
="32768 32768" \
19 ip netns
exec "${NETNS}" \
20 sysctl
-w net.ipv4.ip_autobind_reuse
=1 > /dev
/null
2>&1
24 ip netns del
"${NETNS}"
31 ip netns
exec "${NETNS}" .
/reuseaddr_ports_exhausted