-
Notifications
You must be signed in to change notification settings - Fork 703
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move SelectionOptions and UseMultiplePath to server-local vars
In destination.go there were two global variables used for controlling path and multi-path support for BGP servers, which were populated and modified by gRPC/public API calls. In scenarios where multiple BGP servers are running using the public API it would mean that the last server created would override the options for all running servers. It also lead to data races (Confirmed by using Go's data race detector) that could crash Go's runtime as the value would be overridden unexpectedly. To resolve this, both options have been moved into the TableManager itself which takes a pointer option to both structs populated via the StartBgp API call. These are then passed to the internal methods as new function parameters, ensuring that every server has a unique copy of these structs. All tests were updated to conform to the new API.
- Loading branch information
1 parent
146b2b8
commit 00d297c
Showing
7 changed files
with
112 additions
and
110 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.