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

Stop using Router-ID to distinguish between BGP sessions #398

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Commits on Oct 28, 2024

  1. Use socket addr pair to distinguish between BGP sessions

    BGP-ID is insufficient to distinguish between BGP sessions, as it's
    perfectly valid/reasonable to have multiple sessions to the same peer.
    Or an operator can (incorrectly or otherwise) assign the same BGP-ID to
    multiple routers.
    This ensures that Session-A to Peer-A going down does not impact
    Session-B to Peer-A.
    
    Fixes: #241
    
    Signed-off-by: Trey Aspelund <trey@oxidecomputer.com>
    taspelund committed Oct 28, 2024
    Configuration menu
    Copy the full SHA
    a172be6 View commit details
    Browse the repository at this point in the history
  2. remove inadvertent comment

    taspelund committed Oct 28, 2024
    Configuration menu
    Copy the full SHA
    4e52b58 View commit details
    Browse the repository at this point in the history
  3. Add new() method for SocketAddrPair

    Signed-off-by: Trey Aspelund <trey@oxidecomputer.com>
    taspelund committed Oct 28, 2024
    Configuration menu
    Copy the full SHA
    d20095a View commit details
    Browse the repository at this point in the history
  4. Add test case for multiple BGP sessions to same peer

    Add test case to simulate multiple BGP sessions to same peer
    Also refactor rdb's test_rib() to be a bit more clean and clear.
    
    Signed-off-by: Trey Aspelund <trey@oxidecomputer.com>
    taspelund committed Oct 28, 2024
    Configuration menu
    Copy the full SHA
    75b03e1 View commit details
    Browse the repository at this point in the history

Commits on Nov 1, 2024

  1. Switch to IpAddr for identifying BGP session

    Switch from SocketAddrPair to IpAddr for distinguishing between BGP
    sessions. A BGP peer is identified by the IP we are connecting to,
    and multiple TCP sessions via the same IP isn't something we're
    looking to support. So instead of trying to handle all the cases
    where the local SocketAddr may or may not be available, simplify
    things by using the configured peer IP which will always be
    present regardless of the peer's FSM State.
    
    Signed-off-by: Trey Aspelund <trey@oxidecomputer.com>
    taspelund committed Nov 1, 2024
    Configuration menu
    Copy the full SHA
    5a862da View commit details
    Browse the repository at this point in the history
  2. rdb: test logging improvements

    move rdb over to using mg_common logging functions, rather than its own
    re-implementation. Also add a .gitignore for *.log so nextest doesn't
    pollute the repo.
    
    Signed-off-by: Trey Aspelund <trey@oxidecomputer.com>
    taspelund committed Nov 1, 2024
    Configuration menu
    Copy the full SHA
    da93056 View commit details
    Browse the repository at this point in the history