blockcheck: FreeBSD enable ipv6 frag test

This commit is contained in:
bol-van 2022-01-04 13:37:10 +03:00 committed by GitHub
parent b2ad9cb594
commit 85517a3851
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -757,23 +757,29 @@ ask_params()
echo echo
IP6_DEFRAG_DISABLE= case "$UNAME" in
[ "$UNAME" = "Linux" ] && [ "$IPVS" = 6 -o "$IPVS" = "4 6" ] && { Linux)
local V1=$(sed -nre 's/^Linux version ([0-9]+)\.[0-9]+.*$/\1/p' /proc/version) IP6_DEFRAG_DISABLE=
local V2=$(sed -nre 's/^Linux version [0-9]+\.([0-9]+).*$/\1/p' /proc/version) [ "$IPVS" = 6 -o "$IPVS" = "4 6" ] && {
if [ "$V1" -gt 4 -o "$V1" = 4 -a "$V2" -ge 16 ]; then local V1=$(sed -nre 's/^Linux version ([0-9]+)\.[0-9]+.*$/\1/p' /proc/version)
ipt6_has_raw && IP6_DEFRAG_DISABLE=1 local V2=$(sed -nre 's/^Linux version [0-9]+\.([0-9]+).*$/\1/p' /proc/version)
[ -n "$IP6_DEFRAG_DISABLE" ] || { if [ "$V1" -gt 4 -o "$V1" = 4 -a "$V2" -ge 16 ]; then
echo "WARNING ! ip6tables raw table is not available, ipv6 ipfrag tests are disabled" ipt6_has_raw && IP6_DEFRAG_DISABLE=1
echo [ -n "$IP6_DEFRAG_DISABLE" ] || {
echo "WARNING ! ip6tables raw table is not available, ipv6 ipfrag tests are disabled"
echo
}
else
echo "WARNING ! ipv6 defrag can only be effectively disabled in linux kernel 4.16+"
echo "WARNING ! ipv6 ipfrag tests are disabled"
echo
fi
} }
else ;;
echo "WARNING ! ipv6 defrag can only be effectively disabled in linux kernel 4.16+" *)
echo "WARNING ! ipv6 ipfrag tests are disabled" IP6_DEFRAG_DISABLE=1
echo ;;
fi esac
}
} }