[3/3] IPsec: Log the content of all PLUTO variables in debug mode
Commit Message
Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
---
src/helpers/ipsec-updown | 7 +++++++
1 file changed, 7 insertions(+)
Comments
*thumbs up*
On Fri, 2018-02-23 at 11:05 +0000, Jonatan Schlag via network wrote:
> Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
> ---
> src/helpers/ipsec-updown | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> 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
@@ -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