From: Tobias Brunner Date: Fri, 21 Mar 2025 13:51:08 +0000 (+0100) Subject: vici: Include reqid when listing trap policies X-Git-Tag: 6.0.2dr1~6^2~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6e274271af11e78459e9597a68fc4ed997e275fd;p=thirdparty%2Fstrongswan.git vici: Include reqid when listing trap policies --- diff --git a/src/libcharon/plugins/vici/vici_query.c b/src/libcharon/plugins/vici/vici_query.c index 7bea7579b0..bb02121072 100644 --- a/src/libcharon/plugins/vici/vici_query.c +++ b/src/libcharon/plugins/vici/vici_query.c @@ -629,6 +629,7 @@ static void raise_policy(private_vici_query_t *this, u_int id, char *ike, snprintf(buf, sizeof(buf), "%s/%s", ike, child->get_name(child)); b->begin_section(b, buf); b->add_kv(b, "child", "%s", child->get_name(child)); + b->add_kv(b, "reqid", "%u", child->get_reqid(child)); b->add_kv(b, "ike", "%s", ike); list_mode(b, child, NULL); diff --git a/src/swanctl/commands/list_pols.c b/src/swanctl/commands/list_pols.c index 5fe3f2597c..3db435bffd 100644 --- a/src/swanctl/commands/list_pols.c +++ b/src/swanctl/commands/list_pols.c @@ -86,7 +86,8 @@ CALLBACK(policies, int, pol = hashtable_create(hashtable_hash_str, hashtable_equals_str, 1); ret = vici_parse_cb(res, NULL, policy_values, policy_list, pol); - printf("%s, %s\n", name, pol->get(pol, "mode")); + printf("%s, reqid %s, %s\n", name, pol->get(pol, "reqid"), + pol->get(pol, "mode")); print_label(" label: ", pol->get(pol, "label")); printf(" local: %s\n", pol->get(pol, "local-ts")); printf(" remote: %s\n", pol->get(pol, "remote-ts"));