vici: Include the CHILD_SA unique ID in list-sa event
authorMartin Willi <martin@revosec.ch>
Mon, 27 Oct 2014 12:51:59 +0000 (13:51 +0100)
committerMartin Willi <martin@revosec.ch>
Fri, 20 Feb 2015 12:34:50 +0000 (13:34 +0100)
src/libcharon/plugins/vici/README.md
src/libcharon/plugins/vici/vici_query.c

index b74ef0f..c25b99e 100644 (file)
@@ -559,6 +559,7 @@ command.
                        ]
                        child-sas = {
                                <child-sa-name>* = {
+                                       uniqueid = <unique CHILD_SA identifier>
                                        reqid = <reqid of CHILD_SA>
                                        state = <state string of CHILD_SA>
                                        mode = <IPsec mode, tunnel|transport|beet>
index 54833ab..5a8ef25 100644 (file)
@@ -63,6 +63,7 @@ static void list_child(private_vici_query_t *this, vici_builder_t *b,
        enumerator_t *enumerator;
        traffic_selector_t *ts;
 
+       b->add_kv(b, "uniqueid", "%u", child->get_unique_id(child));
        b->add_kv(b, "reqid", "%u", child->get_reqid(child));
        b->add_kv(b, "state", "%N", child_sa_state_names, child->get_state(child));
        b->add_kv(b, "mode", "%N", ipsec_mode_names, child->get_mode(child));