From e1ee04fbd7a9e4b38ecc9080d8f998962c8ff4ee Mon Sep 17 00:00:00 2001 From: Dirk Date: Wed, 26 Sep 2018 09:21:28 +0200 Subject: [PATCH] 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. --- testssl.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/testssl.sh b/testssl.sh index 10c4ea5..5d3833f 100755 --- a/testssl.sh +++ b/testssl.sh @@ -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