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. #1134).

For Linux is basically addresses #1130 / #1113.

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

View File

@ -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