From f35648f2966061840563502763e5665787a8875b Mon Sep 17 00:00:00 2001 From: sever-sever Date: Mon, 7 Jun 2021 22:11:48 +0000 Subject: charon-syslog: T2620: Add ike-name to IPSec logs (cherry picked from commit f0166cc4b2ba66c7cd2d2d2ab9aa8be839a26543) --- .../hooks/live/30-strongswan-configs.chroot | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'data/live-build-config/hooks/live/30-strongswan-configs.chroot') diff --git a/data/live-build-config/hooks/live/30-strongswan-configs.chroot b/data/live-build-config/hooks/live/30-strongswan-configs.chroot index 25562a65..59e000a9 100755 --- a/data/live-build-config/hooks/live/30-strongswan-configs.chroot +++ b/data/live-build-config/hooks/live/30-strongswan-configs.chroot @@ -36,3 +36,22 @@ with open('/etc/strongswan.d/charon/farp.conf', 'r') as f: with open('/etc/strongswan.d/charon/farp.conf', 'w') as f: f.write(farp_conf) + + +# Add ike-name to logging +charon_logging = """ +charon { + syslog { + # prefix for each log message + identifier = charon + # use default settings to log to the LOG_DAEMON facility + daemon { + default = 1 + ike_name = yes + } + } +} +""" + +with open('/etc/strongswan.d/charon-logging.conf', 'w') as f: + f.write(charon_logging) -- cgit v1.2.3