vici: Report interface IDs

This commit is contained in:
Tobias Brunner 2019-02-12 12:13:41 +01:00
parent 3fa8c3e529
commit aa841dbbfc
2 changed files with 13 additions and 0 deletions

View File

@ -813,6 +813,8 @@ command.
mark-mask-in = <hex encoded inbound Netfilter mark mask>
mark-out = <hex encoded outbound Netfilter mark value>
mark-mask-out = <hex encoded outbound Netfilter mark mask>
if-id-in = <hex encoded inbound XFRM interface ID>
if-id-out = <hex encoded outbound XFRM interface ID>
encr-alg = <ESP encryption algorithm name, if any>
encr-keysize = <ESP encryption key size, if applicable>
integ-alg = <ESP or AH integrity algorithm name, if any>

View File

@ -155,6 +155,7 @@ static void list_child(private_vici_query_t *this, vici_builder_t *b,
{
time_t t;
uint64_t bytes, packets;
uint32_t if_id;
uint16_t alg, ks;
proposal_t *proposal;
enumerator_t *enumerator;
@ -185,6 +186,16 @@ static void list_child(private_vici_query_t *this, vici_builder_t *b,
}
add_mark(b, child->get_mark(child, TRUE), "mark-in", "mark-mask-in");
add_mark(b, child->get_mark(child, FALSE), "mark-out", "mark-mask-out");
if_id = child->get_if_id(child, TRUE);
if (if_id)
{
b->add_kv(b, "if-id-in", "%.8x", if_id);
}
if_id = child->get_if_id(child, FALSE);
if (if_id)
{
b->add_kv(b, "if-id-out", "%.8x", if_id);
}
proposal = child->get_proposal(child);
if (proposal)
{