aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/net/ip_defrag.sh
blob: 78743adcca9e795a913383d42792f433ec18fda4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
#
# Run a couple of IP defragmentation tests.

set +x
set -e

echo "ipv4 defrag"

run_v4() {
sysctl -w net.ipv4.ipfrag_high_thresh=9000000 &> /dev/null
sysctl -w net.ipv4.ipfrag_low_thresh=7000000 &> /dev/null
./ip_defrag -4
}
export -f run_v4

./in_netns.sh "run_v4"

echo "ipv4 defrag with overlaps"
run_v4o() {
sysctl -w net.ipv4.ipfrag_high_thresh=9000000 &> /dev/null
sysctl -w net.ipv4.ipfrag_low_thresh=7000000 &> /dev/null
./ip_defrag -4o
}
export -f run_v4o

./in_netns.sh "run_v4o"