Am 12.12.22 um 14:30 schrieb Gert Doering:
Hi,
On Mon, Dec 12, 2022 at 01:50:51PM +0100, Arne Schwabe wrote:
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
I agree, doing the iterator here for every single active peer when we
already have the array. But then, of course, p2p peer-id will be
"something random", not constrained by max-clients.
on p2mp code, it will be contrainst by max-clients. The random peerid
only happens in p2p mode where do not have multi_instance anyway.
Anyway, we have a procedural problem here - kp@ is on vacation for a
few weeks now, so we won't see a v2 of this patch any time soon.
Do you think the patch is ready to be merged, "as is", with not-so-good
efficiency? One of you could then send a followup patch changing this
to use the array accessor.
Fine by me.
Arne
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel