]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
kernel-netlink: Increase debug level of the "querying [...]" log messages
authorNoel Kuntze <noel.kuntze@thermi.consulting>
Fri, 2 Sep 2022 23:37:33 +0000 (01:37 +0200)
committerTobias Brunner <tobias@strongswan.org>
Fri, 16 Sep 2022 14:40:06 +0000 (16:40 +0200)
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

src/libcharon/plugins/kernel_netlink/kernel_netlink_ipsec.c

index ca6ce175ba646918a5da2fddf75358894ccbf519..6f7b50fb7a258d678eb94c231fa94d143f40142d 100644 (file)
@@ -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;