kernel-handler: Log CPU ID that's passed with an acquire
This commit is contained in:
@@ -56,13 +56,17 @@ static inline protocol_id_t proto_ip2ike(uint8_t protocol)
|
|||||||
METHOD(kernel_listener_t, acquire, bool,
|
METHOD(kernel_listener_t, acquire, bool,
|
||||||
private_kernel_handler_t *this, uint32_t reqid, kernel_acquire_data_t *data)
|
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)
|
if (data->label)
|
||||||
{
|
{
|
||||||
snprintf(buf, sizeof(buf), ", label {%s}",
|
snprintf(lbuf, sizeof(lbuf), ", label {%s}",
|
||||||
data->label->get_string(data->label));
|
data->label->get_string(data->label));
|
||||||
}
|
}
|
||||||
|
if (data->cpu != CPU_ID_MAX)
|
||||||
|
{
|
||||||
|
snprintf(cbuf, sizeof(cbuf), ", cpu {%u}", data->cpu);
|
||||||
|
}
|
||||||
if (data->seq)
|
if (data->seq)
|
||||||
{
|
{
|
||||||
snprintf(sbuf, sizeof(sbuf), ", seq {%u}", 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)
|
if (data->src && data->dst)
|
||||||
{
|
{
|
||||||
DBG1(DBG_KNL, "creating acquire job for policy %R === %R with "
|
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
|
else
|
||||||
{
|
{
|
||||||
DBG1(DBG_KNL, "creating acquire job for policy with reqid {%u}%s%s",
|
DBG1(DBG_KNL, "creating acquire job for policy with reqid {%u}%s%s%s",
|
||||||
reqid, buf, sbuf);
|
reqid, lbuf, cbuf, sbuf);
|
||||||
}
|
}
|
||||||
lib->processor->queue_job(lib->processor,
|
lib->processor->queue_job(lib->processor,
|
||||||
(job_t*)acquire_job_create(reqid, data));
|
(job_t*)acquire_job_create(reqid, data));
|
||||||
|
|||||||
Reference in New Issue
Block a user