]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
vici: Include reqid when listing trap policies
authorTobias Brunner <tobias@strongswan.org>
Fri, 21 Mar 2025 13:51:08 +0000 (14:51 +0100)
committerTobias Brunner <tobias@strongswan.org>
Wed, 28 May 2025 08:11:53 +0000 (10:11 +0200)
src/libcharon/plugins/vici/vici_query.c
src/swanctl/commands/list_pols.c

index 7bea7579b0c28e290303fb1280821a95cff092bf..bb02121072c2645ab8b3de1833ecbff9f592dec7 100644 (file)
@@ -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);
index 5fe3f2597c0cad7c9be7523fec1e7d7f88590898..3db435bffd4ad37e95b8c91a631ff5bd8e0a491c 100644 (file)
@@ -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"));