From: Jonatan Schlag via network Date: Fri, 23 Feb 2018 11:05:35 +0000 (+0000) Subject: IPsec: Log the content of all PLUTO variables in debug mode X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=93a9eeb0e4a6db467f301a87e1430c8d3f581998;p=people%2Fjschlag%2Fnetwork.git IPsec: Log the content of all PLUTO variables in debug mode Signed-off-by: Jonatan Schlag Signed-off-by: Michael Tremer --- diff --git a/src/helpers/ipsec-updown b/src/helpers/ipsec-updown index e4d704d..12ead03 100644 --- a/src/helpers/ipsec-updown +++ b/src/helpers/ipsec-updown @@ -29,6 +29,13 @@ network_settings_read # Make sure we are called by strongSwan assert isset PLUTO_VERSION +if enabled DEBUG; then + while read line; do + [[ ${line} =~ ^PLUTO_ ]] || continue + log DEBUG " ${line}" + done <<< "$(printenv | sort)" +fi + CONNECTION="${PLUTO_CONNECTION}" if ! ipsec_connection_read_config "${CONNECTION}"; then