Page MenuHomeFreeBSD

if_ovpn: remove peer limit
ClosedPublic

Authored by kp on Nov 28 2022, 9:21 PM.
Tags
None
Referenced Files
F166326428: D37524.id113758.diff
Wed, Aug 12, 10:36 PM
F166326426: D37524.id113595.diff
Wed, Aug 12, 10:35 PM
F166326424: D37524.id113579.diff
Wed, Aug 12, 10:35 PM
F166326414: D37524.id.diff
Wed, Aug 12, 10:35 PM
F166326356: D37524.diff
Wed, Aug 12, 10:35 PM
F166318691: D37524.id113579.diff
Wed, Aug 12, 9:18 PM
F166312086: D37524.id.diff
Wed, Aug 12, 8:14 PM
F166245651: D37524.id113595.diff
Wed, Aug 12, 1:27 PM

Details

Summary

Replace the fixed-sized array by an RB_TREE. This should both speed up
lookups and remove the 128 peer limit.

We may wish to consider adding additional trees to also speed up the
lookup by IPv4/IPv6 addresses.

Sponsored by: Rubicon Communications, LLC ("Netgate")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kp requested review of this revision.Nov 28 2022, 9:21 PM
sys/net/if_ovpn.c
269

(struct ovpn_kpeer *)&p

The cast looks redundant. p is declared as struct ovpn_kpeer at line 278

1620–1623

IPv6

kp marked 2 inline comments as done.Nov 29 2022, 9:32 AM

Good catch.

Looks good to me.

And you may also want to retire OVPN_MAX_PEERS ;)

This revision is now accepted and ready to land.Dec 1 2022, 10:10 AM
In D37524#854386, @zlei wrote:

Looks good to me.

And you may also want to retire OVPN_MAX_PEERS ;)

Thanks. I spotted that one eventually and fixed it, but figured it wasn't worth updating the review for that.

This revision was automatically updated to reflect the committed changes.