VPN: OpenVPN: Instances - debounce learn-address calls#9843
Merged
AdSchellevis merged 1 commit intomasterfrom Feb 24, 2026
Merged
VPN: OpenVPN: Instances - debounce learn-address calls#9843AdSchellevis merged 1 commit intomasterfrom
AdSchellevis merged 1 commit intomasterfrom
Conversation
fichtner
reviewed
Feb 22, 2026
75b2ded to
9d177b6
Compare
swhite2
requested changes
Feb 23, 2026
…e number of alias updates to a minimum. When a lot of clients connect at the exact same time, it doesn't really make sense to keep calling the alias update procedure as logically we are only interested in the last one. This change simply opens a file, keeps track of its modification stamp and if another updated it after us, assume that caller is responsible for making the magic happen. Although there is a small downside to this (clients connecting constantly, nobody resposible for accounting), the gain is likely much bigger as it prevents these calls from floodin the system in all cases (saving a lot of load).
9d177b6 to
d74dc5a
Compare
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
To help us limit the number of alias updates to a minimum.
When a lot of clients connect at the exact same time, it doesn't really make sense to keep calling the alias update procedure as logically we are only interested in the last one. This change simply opens a file, keeps track of its modification stamp and if another updated it after us, assume that caller is responsible for making the magic happen.
Although there is a small downside to this (clients connecting constantly, nobody responsible for accounting), the gain is likely much bigger as it prevents these calls from floodin the system in all cases (saving a lot of load).
There seems to be a possibility to trigger an excessive amount of calls to learn-address, but during my tests I have never seen connects from one client triggering updates for another. If this would happen, the number of calls would grow substantially.
@swhite2 @Monviech