From cf1655624871e1e967b413b45b85b13bf202593b Mon Sep 17 00:00:00 2001 From: Noel Kuntze Date: Sat, 3 Sep 2022 01:37:33 +0200 Subject: [PATCH] kernel-netlink: Increase debug level of the "querying [...]" log messages When watching the output of `swanctl -l` during debugging, the debug messages in query_sa/policy() cause a lot of noise in the logs (level 2 for DBG_KNL still has actually useful information that we want to see in the logs) and they're not very useful. Compared to the messages in the functions above, the ones in update_sa() and get_replay_state() are not seen often. But since there already is a log message on level 2 in update_sa(), they're kinda redundant. Closes strongswan/strongswan#1271 --- .../plugins/kernel_netlink/kernel_netlink_ipsec.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libcharon/plugins/kernel_netlink/kernel_netlink_ipsec.c b/src/libcharon/plugins/kernel_netlink/kernel_netlink_ipsec.c index ca6ce175ba..6f7b50fb7a 100644 --- a/src/libcharon/plugins/kernel_netlink/kernel_netlink_ipsec.c +++ b/src/libcharon/plugins/kernel_netlink/kernel_netlink_ipsec.c @@ -2060,7 +2060,7 @@ static void get_replay_state(private_kernel_netlink_ipsec_t *this, memset(&request, 0, sizeof(request)); - DBG2(DBG_KNL, "querying replay state from SAD entry with SPI %.8x", + DBG3(DBG_KNL, "querying replay state from SAD entry with SPI %.8x", ntohl(sa->spi)); hdr = &request.hdr; @@ -2164,7 +2164,7 @@ METHOD(kernel_ipsec_t, query_sa, status_t, memset(&request, 0, sizeof(request)); format_mark(markstr, sizeof(markstr), id->mark); - DBG2(DBG_KNL, "querying SAD entry with SPI %.8x%s", ntohl(id->spi), + DBG3(DBG_KNL, "querying SAD entry with SPI %.8x%s", ntohl(id->spi), markstr); hdr = &request.hdr; @@ -2353,7 +2353,7 @@ METHOD(kernel_ipsec_t, update_sa, status_t, memset(&request, 0, sizeof(request)); format_mark(markstr, sizeof(markstr), id->mark); - DBG2(DBG_KNL, "querying SAD entry with SPI %.8x%s for update", + DBG3(DBG_KNL, "querying SAD entry with SPI %.8x%s for update", ntohl(id->spi), markstr); /* query the existing SA first */ @@ -3047,7 +3047,7 @@ METHOD(kernel_ipsec_t, query_policy, status_t, format_mark(markstr, sizeof(markstr), id->mark); format_label(labelstr, sizeof(labelstr), id->label); - DBG2(DBG_KNL, "querying policy %R === %R %N%s%s", id->src_ts, id->dst_ts, + DBG3(DBG_KNL, "querying policy %R === %R %N%s%s", id->src_ts, id->dst_ts, policy_dir_names, id->dir, markstr, labelstr); hdr = &request.hdr; -- 2.47.2