From: Tobias Brunner Date: Mon, 26 Sep 2022 14:55:00 +0000 (+0200) Subject: kernel-handler: Log CPU ID that's passed with an acquire X-Git-Tag: 6.0.2dr1~5^2~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=65b7f9d56338ff16fdd716bbed1709b59c5b4a7e;p=thirdparty%2Fstrongswan.git kernel-handler: Log CPU ID that's passed with an acquire --- diff --git a/src/libcharon/kernel/kernel_handler.c b/src/libcharon/kernel/kernel_handler.c index 8bbb449170..6aa6b3a1b7 100644 --- a/src/libcharon/kernel/kernel_handler.c +++ b/src/libcharon/kernel/kernel_handler.c @@ -56,13 +56,17 @@ 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] = "", sbuf[BUF_LEN] = ""; + char lbuf[BUF_LEN] = "", cbuf[32] = "", sbuf[32] = ""; if (data->label) { - snprintf(buf, sizeof(buf), ", label {%s}", + snprintf(lbuf, sizeof(lbuf), ", label {%s}", data->label->get_string(data->label)); } + if (data->cpu != CPU_ID_MAX) + { + snprintf(cbuf, sizeof(cbuf), ", cpu {%u}", data->cpu); + } if (data->seq) { snprintf(sbuf, sizeof(sbuf), ", seq {%u}", data->seq); @@ -70,12 +74,12 @@ METHOD(kernel_listener_t, acquire, bool, if (data->src && data->dst) { DBG1(DBG_KNL, "creating acquire job for policy %R === %R with " - "reqid {%u}%s%s", data->src, data->dst, reqid, buf, sbuf); + "reqid {%u}%s%s%s", data->src, data->dst, reqid, lbuf, cbuf, sbuf); } else { - DBG1(DBG_KNL, "creating acquire job for policy with reqid {%u}%s%s", - reqid, buf, sbuf); + DBG1(DBG_KNL, "creating acquire job for policy with reqid {%u}%s%s%s", + reqid, lbuf, cbuf, sbuf); } lib->processor->queue_job(lib->processor, (job_t*)acquire_job_create(reqid, data));