]> git.ipfire.org Git - thirdparty/strongswan.git/commit
vici: Raise alert events from the bus alert listener hook
authorMartin Willi <martin@strongswan.org>
Tue, 23 Sep 2025 11:01:52 +0000 (13:01 +0200)
committerTobias Brunner <tobias@strongswan.org>
Thu, 2 Oct 2025 08:22:32 +0000 (10:22 +0200)
commitd46529fe2dfdace41f15e9819273fc534df917bb
tree5921fcc801092480ecb4c7d1afcf3212363ec932
parentb83aed1362821b3bcac89d280e0f97f95c7cff01
vici: Raise alert events from the bus alert listener hook

The bus alert infrastructure is currently exposed through the error-notify
plugin using a dedicated socket using a rather archaic message format.
Vici clients would need a dedicated socket connection just to receive such
alert messages, making their implementation more complex.

With vici, it is rather trivial to expose bus alerts through a dedicated
event message that vici clients may subscribe to. Add such an "alert"
event type to vici. Alert names are mapped to strings for simple consumption by
clients.

For now, the error-notify string message is omitted from events, as it mostly
contains static information without much value; instead add the IKE_SA details
for alerts associated to an IKE_SA. Other alert specific data may be added in
the future if needed; preferably using a structured format instead of the
arbitrary string messages used by error-notify. To allow future extensions,
wrap IKE_SA details under a dedicated "ike-sa" property.
src/libcharon/plugins/vici/README.md
src/libcharon/plugins/vici/vici_query.c