From: Tobias Brunner Date: Tue, 21 Dec 2021 10:26:12 +0000 (+0100) Subject: kernel-handler: Log security label received with acquire X-Git-Tag: 5.9.6rc1~3^2~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81c362829e5fb2a95edbebcb9bed89c20edf7380;p=thirdparty%2Fstrongswan.git kernel-handler: Log security label received with acquire --- diff --git a/src/libcharon/kernel/kernel_handler.c b/src/libcharon/kernel/kernel_handler.c index 4f467efee9..2f881d7461 100644 --- a/src/libcharon/kernel/kernel_handler.c +++ b/src/libcharon/kernel/kernel_handler.c @@ -55,14 +55,22 @@ static inline protocol_id_t proto_ip2ike(uint8_t protocol) METHOD(kernel_listener_t, acquire, bool, private_kernel_handler_t *this, uint32_t reqid, kernel_acquire_data_t *data) { + char buf[BUF_LEN] = ""; + + if (data->label) + { + snprintf(buf, sizeof(buf), ", label {%s}", + data->label->get_string(data->label)); + } if (data->src && data->dst) { DBG1(DBG_KNL, "creating acquire job for policy %R === %R with " - "reqid {%u}", data->src, data->dst, reqid); + "reqid {%u}%s", data->src, data->dst, reqid, buf); } else { - DBG1(DBG_KNL, "creating acquire job for policy with reqid {%u}", reqid); + DBG1(DBG_KNL, "creating acquire job for policy with reqid {%u}%s", + reqid, buf); } lib->processor->queue_job(lib->processor, (job_t*)acquire_job_create(reqid, data));