1
0
mirror of https://github.com/drwetter/testssl.sh.git synced 2025-05-18 22:26:04 +02:00

Put temporary workaounrd in place for Linux + TCP fragmentation

This commit basically reverses the previous commit 305eefc for
Linux only. Here the external printf is working fine, where as
the BSDish counterpart is not (see e.g. ).

For Linux is basically addresses  / .

A compatible solution for all OS needs to be found.
This commit is contained in:
Dirk 2018-09-26 09:21:28 +02:00
parent 305eefc9e8
commit e1ee04fbd7

@ -15499,15 +15499,14 @@ check_bsd_mount() {
# This sets the PRINTF command for writing into TCP sockets. It is needed because
# The shell builtin printf flushes the write buffer at every \n, ("\x0a") which
# in turn means a new TCP fragment. That causes a slight performance penalty and
# and some F5s to hiccup, see https://github.com/drwetter/testssl.sh/pull/1113
# and some F5s to hiccup, see #1113. Unfortunately this can be only used under
# Linux, see #1134. A better solution needs to follow
#
choose_printf() {
# temporary measure
PRINTF=printf
return 0
PRINTF="$(type -P printf)"
[[ -n "$PRINTF" ]] && return 0
if [[ -n "$PRINTF" ]] && [[ "$SYSTEM" == Linux ]]; then
return 0
fi
if type -t printf >/dev/null; then
PRINTF=printf
return 0