]> git.ipfire.org Git - people/ms/network.git/commitdiff
IPsec: Log the content of all PLUTO variables in debug mode
authorJonatan Schlag via network <network@lists.ipfire.org>
Fri, 23 Feb 2018 11:05:35 +0000 (11:05 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 1 Mar 2018 14:51:33 +0000 (14:51 +0000)
Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/helpers/ipsec-updown

index e4d704d33785e7ceb14dca10da77af04ce69f62b..12ead035631ea64b433dfb8335de2755c21f07ca 100644 (file)
@@ -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