Am 12.12.22 um 13:34 schrieb Lev Stipakov:
Hi,

This is good - I need an API to get stats to make openvpn-gui show
those (via the management interface).

I am not too much into FreeBSD parts, but

+    hash_iterator_init(m->hash, &hi);
+
+    while ((he = hash_iterator_next(&hi)))
+    {
+        struct multi_instance *mi = (struct multi_instance *) he->value;
+
+        if (mi->context.c2.tls_multi->peer_id != peerid)
+            continue;

Shouldn't we use m->instances[peerid] instead of iterating over m->hash?


Yes and a check that kernel does not give something > max_peer

Arne



_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to