mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-03 23:39:45 +01: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. #1134).
For Linux is basically addresses #1130 / #1113.
A compatible solution for all OS needs to be found.
This commit is contained in:
parent
305eefc9e8
commit
e1ee04fbd7
11
testssl.sh
11
testssl.sh
@ -15499,15 +15499,14 @@ check_bsd_mount() {
|
|||||||
# This sets the PRINTF command for writing into TCP sockets. It is needed because
|
# 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
|
# 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
|
# 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() {
|
choose_printf() {
|
||||||
# temporary measure
|
|
||||||
PRINTF=printf
|
|
||||||
return 0
|
|
||||||
|
|
||||||
PRINTF="$(type -P printf)"
|
PRINTF="$(type -P printf)"
|
||||||
[[ -n "$PRINTF" ]] && return 0
|
if [[ -n "$PRINTF" ]] && [[ "$SYSTEM" == Linux ]]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
if type -t printf >/dev/null; then
|
if type -t printf >/dev/null; then
|
||||||
PRINTF=printf
|
PRINTF=printf
|
||||||
return 0
|
return 0
|
||||||
|
Loading…
Reference in New Issue
Block a user