Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move SelectionOptions and UseMultiplePath to server-local vars #2716

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Oct 3, 2023

  1. 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.
    dawn-minion committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    00d297c View commit details
    Browse the repository at this point in the history