Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion PropertySheet.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<PropertyGroup Label="UserMacros">
<OVPN_DCO_VERSION_MAJOR>2</OVPN_DCO_VERSION_MAJOR>
<OVPN_DCO_VERSION_MINOR>7</OVPN_DCO_VERSION_MINOR>
<OVPN_DCO_VERSION_PATCH>0</OVPN_DCO_VERSION_PATCH>
<OVPN_DCO_VERSION_PATCH>1</OVPN_DCO_VERSION_PATCH>
</PropertyGroup>
<PropertyGroup />
<ItemDefinitionGroup>
Expand Down
8 changes: 8 additions & 0 deletions trie.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ IPTrie::Insert(const UCHAR* ip, int prefixLength, OvpnPeerContext* peer) {
}

// update the node with the peer info
// keep track of any existing peer so we can release it outside the lock
OvpnPeerContext* oldPeer = current->peer;
current->peer = peer;
current->isRoute = true;

Expand All @@ -148,6 +150,12 @@ IPTrie::Insert(const UCHAR* ip, int prefixLength, OvpnPeerContext* peer) {

ExReleaseSpinLockExclusive(&Lock, kirql);

// release the previous peer outside the lock if it existed
if (oldPeer) {
LOG_INFO("Release previous peer", TraceLoggingValue(oldPeer->PeerId, "peerId"));
OvpnPeerCtxRelease(oldPeer);
}

done:
LOG_EXIT();
return status;
Expand Down
Loading