-
Notifications
You must be signed in to change notification settings - Fork 5
Initial IPv6 Support #533
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
Open
taspelund
wants to merge
133
commits into
main
Choose a base branch
from
trey/ipv6
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Initial IPv6 Support #533
Changes from all commits
Commits
Show all changes
133 commits
Select commit
Hold shift + click to select a range
3d55f09
remove mg-common::net::IpPrefix and friends
taspelund 26e3205
mg-ddm-verify: remove custom Prefix/Destination types
taspelund 3c1e428
rdb: remove unused types
taspelund 35885bc
IPv6 foundations
taspelund f8c8740
Support for IPv6 Static Routes
taspelund e15860f
mgadm: move to oxnet instead of custom types
taspelund 1594219
Zero host bits in prefixes
taspelund c004f22
remove invalid static prefixes from db on startup
taspelund dae03ff
rename host_bit zeroing function
taspelund e1620eb
Add unit tests for Prefix conversion, IPv6, static routing
taspelund 3cb5f54
Move macros from bgp into mg-common
taspelund fa64f8b
Add IPv6 support for BGP Origin
taspelund 560eaa7
Add buildomat job for mgadm
taspelund d64b896
Use const for interval/iterations in wait_for macros
taspelund b899397
Fix buildomat copy pasta error
taspelund 004a86d
move rib queries out of bgp and add query filters
taspelund f2082b0
remove useless cp in test-mgadm.sh
taspelund bfaef67
bgp: add more info to session logs
taspelund 21e4c01
bgp: Add NET error logs for channel
taspelund 0f05fb4
mg-common, bgp: refactor test macros, add assert msg
taspelund 59985f4
bgp: fix IdleHoldTimer handling
taspelund cde0b69
Merge remote-tracking branch 'origin/main' into trey/ipv6
taspelund e39f0bd
bgp: stop binding the listener after every accept
taspelund e6713cb
bgp: centralize IdleHoldTimer handling
taspelund 44b4795
bgp: document and refactor basic tests
taspelund 47378e5
bgp: refactor tests and add support for TCP
taspelund 50320a3
bgp: add support for local TCP based tests
taspelund ff26150
bgp: more connection log changes
taspelund 1f707e5
bgp, mg-common: fix LoopbackIpManager, cleanup tests
taspelund bc846a6
bgp: refactor tests, bind before TCP connect()
taspelund 0ed315b
bgp: fix comment, remove dupe timer disable
taspelund c214ac0
bgp, mg-common: add unit to session runner logs
taspelund 810ff47
bgp, mg-common: move bgp log macros to mod in bgp
taspelund e89861d
bgp: start adding structure to logs
taspelund 28487f3
bgp: add structured logging for connections
taspelund 4a8d46a
bgp: add structured logs to clock, fix mod/unit name
taspelund bf69398
bgp: finish converting to structured logging
taspelund 1f26da8
rdb: convert to structured logging
taspelund 3ac20cb
bgp: tweak message display, expand logs
taspelund cc57542
bfd: move to structured logging
taspelund de48295
mg-lower: convert to structured logging
taspelund 8d12047
mgd: convert to structured logging
taspelund 21158ab
bgp: track connection creator in logs
taspelund 7458c6f
bgp: give clock named values
taspelund d985f6a
bgp: add clock state to session_runner logs
taspelund ffc4af8
bgp: add connection collision logs
taspelund a0dbbbe
bgp: major fsm refactoring
taspelund 2f55bb1
bgp: continuation of session runner refactor
taspelund de04bb2
bgp: start Cnx recv loop after conn registration
taspelund 0e4796a
bgp: finish conn_id handling e.g. in established
taspelund 7daa26d
bgp: more SessionRunner.stop() and unregister_conn()
taspelund 14b44dd
bgp: logging macro improvements
taspelund cdf0a44
bgp: fix premature clock shutdown on connection drop
taspelund 3a18ab0
bgp: remove restart_connect_retry() method
taspelund cece3c1
bgp: improve timer and connection lifecycle management
taspelund 5c23902
bgp: fix ConnectRetryTimerExpires deadlock
taspelund e29fc0d
bgp: make outbound connections non-blocking
taspelund 86752c0
move back to mpsc channels
taspelund 180e6a9
bgp: improve connection cleanup and error handling
taspelund 3efab1c
mg-common: remove fs2 dependency
taspelund 05a9445
fix illumos compilation errors and tcp md5
taspelund 7a24018
mg-common: fix LoopbackIpManager for illumos
taspelund 6b7f4fa
bgp: update channel logging
taspelund a9a5188
bgp: fix collision resolution semantics
taspelund 5358c21
buildomat: run bgp tests with pfexec
taspelund 67ade06
bgp: fix IPv6 next-hops sent for IPv4 updates
taspelund f5aeb34
bgp, mgd: more bind() and connect() fixes
taspelund 6036628
bgp: cleanup Update Display impl
taspelund 5fbcd4c
bgp: reject second connection with same initiator
taspelund 9930a02
bgp: add type documentation and do minor refactoring
taspelund 545ee54
bgp, mgd: add timer enabled check, shorten names
taspelund 83d6c17
bgp: make connect() timeout 1/3 ConnectRetryTime
taspelund 27f2481
bgp: track BgpConnector thread lifecycle
taspelund 37eda87
bgp: fix missing connection collision unregister
taspelund bc0312f
bgp: fix concurrent startup deadlock w/ timer jitter
taspelund 51045a6
bgp: add channel_id to BgpConnectionChannel
taspelund 56d2a7e
bgp: refactor resolve_collision()
taspelund ecb986a
bgp: validate connection ID in OpenConfirm message handler
taspelund 50b4c53
bgp: eagerly resolve collisions on first open
taspelund 1cb96d2
buildomat: use new rib status commands
taspelund 50655b1
bgp: handle async collision resolution notifications
taspelund 28ec049
Add MPL to new files
taspelund ccaca84
bgp: consolidate to rdb Prefix types
taspelund 1837449
bgp: Idle and IdleHoldTime improvements
taspelund 6cf0bc1
bgp: disable IdleHoldTimer in test topologies
taspelund 1904844
bgp: revert non-standard notification handling
taspelund 10d7c46
Remove last vestiges of crossbeam_channel
taspelund 2a2717e
Merge remote-tracking branch 'origin/main' into trey/ipv6
taspelund eb9af4c
rdb: add generic get_test_db method
taspelund 181497a
bfd: make cargo fmt happy
taspelund e4f85d3
bgp: address some linux build errors
taspelund 9380f83
bgp: fix another double import
taspelund 9702361
buildomat: remember to source test-common
taspelund 2039742
bgp: singly re-add sockopt imports
taspelund 556087c
bgp: make clippy happy
taspelund bff225a
Add versioned endpoint for bgp message history
taspelund 996d464
bgp: add versioned endpoint for BGP neighbors
taspelund a3f3c54
bgp: versioned API updates
taspelund dcad2e9
openapi: publish spec for mg-admin API v2
taspelund e64aa1f
mgadm: update client API calls
taspelund 1201b75
Remove AddressFamily::All
taspelund 41ac151
refactor: consolidate AddressFamily and improve documentation
taspelund cf1c650
bgp: add deterministic collision resolution knob
taspelund 08bf9e8
Make libnet dependency illumos-specific
taspelund 20f022f
mg-common: linux clippy make happy
taspelund 2054c22
docs: add docs dir with bgp architecture overview
taspelund 1b236ab
PR review feedback batch #1
taspelund d3eb8fe
Fix missing rename for illumos
taspelund a3d003d
PR review feedback batch #2
taspelund 5235789
bgp: initial work to move recv loop to typestate
taspelund 1865014
bgp: apply typestate pattern to connections and recv loops
taspelund 1496cf3
bgp: move FSM event queue reads to macro
taspelund 08fe710
PR review batch #3
taspelund d5ee84f
bgp: retry accept() until timeout expires
taspelund bab9114
bgp: initial cleanup/improvement of md5 code
taspelund 5e24fec
bgp: refactor MD5 SA keepalive to use typestate
taspelund 70d0d33
bgp: fix illumos compile issues in md5 code
taspelund 795c70a
rdb: separate wire format parsing from semantic validation
taspelund 6c482f1
bgp: filter bogus nlri before empty check
taspelund d8db273
bgp: make Prefix -> PrefixV1 conversion infallible
taspelund 06db20d
bgp, rdb: refactor Prefix validation
taspelund 8043c42
docs: expand on deterministic collision resolution
taspelund 0a289a2
buildomat, bfd, rdb: fix test issues with Db
taspelund fb04ee2
bgp: remove Default for SessionInfo
taspelund 88ba092
mgd, rdb: update prefix host bit handling
taspelund 9ef321d
bgp: cleanup connection id validation in FSM
taspelund b57f159
bgp: mark event_rx channel disconnected unreachable
taspelund a5c5a26
bgp: defensive handling of FSM timer events
taspelund 32f5436
fmt
taspelund 674e352
mgadm: sort bgp neighbors by IP
taspelund 4621c28
Add BGP FSM event history
taspelund 07181aa
bgp: fix first batch of thread leaks
taspelund a57c700
bgp: add explicit router lifecycle
taspelund File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,6 +6,7 @@ | |
| #: rust_toolchain = "stable" | ||
| #: output_rules = [ | ||
| #: "/work/*.log", | ||
| #: "/tmp/*.db", | ||
| #: ] | ||
| #: | ||
|
|
||
|
|
||
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| #!/bin/bash | ||
| #: | ||
| #: name = "test-mgadm" | ||
| #: variety = "basic" | ||
| #: target = "helios-2.0" | ||
| #: rust_toolchain = "stable" | ||
| #: output_rules = [ | ||
| #: "/work/*.log", | ||
| #: ] | ||
| #: access_repos = [ | ||
| #: "oxidecomputer/dendrite", | ||
| #: ] | ||
| #: | ||
|
|
||
| set -x | ||
| set -e | ||
|
|
||
| # NOTE: This version should be in sync with the recommended version in | ||
| # .config/nextest.toml. (Maybe build an automated way to pull the recommended | ||
| # version in the future.) | ||
| NEXTEST_VERSION='0.9.97' | ||
| PLATFORM='illumos' | ||
|
|
||
| cargo --version | ||
| rustc --version | ||
| cargo install cargo-nextest --version "$NEXTEST_VERSION" | ||
|
|
||
| source .github/buildomat/test-common.sh | ||
|
|
||
| pushd mgadm | ||
|
|
||
| cargo nextest run |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| #!/bin/bash | ||
| #: | ||
| #: name = "test-proptest" | ||
| #: variety = "basic" | ||
| #: target = "helios-2.0" | ||
| #: rust_toolchain = "stable" | ||
| #: output_rules = [ | ||
| #: "/work/*.log", | ||
| #: "/work/proptest-regressions/*", | ||
| #: "/tmp/*.db", | ||
| #: ] | ||
| #: access_repos = [ | ||
| #: "oxidecomputer/dendrite", | ||
| #: ] | ||
| #: | ||
|
|
||
| set -x | ||
| set -e | ||
|
|
||
| # NOTE: This version should be in sync with the recommended version in | ||
| # .config/nextest.toml. (Maybe build an automated way to pull the recommended | ||
| # version in the future.) | ||
| NEXTEST_VERSION='0.9.97' | ||
| PLATFORM='illumos' | ||
|
|
||
| cargo --version | ||
| rustc --version | ||
| cargo install cargo-nextest --version "$NEXTEST_VERSION" | ||
|
|
||
| source .github/buildomat/test-common.sh | ||
|
|
||
| # Run property-based tests with high intensity (default is 256) | ||
|
|
||
| # RDB proptest suite | ||
| pushd rdb | ||
| PROPTEST_CASES=1000000 cargo nextest run --lib proptest | ||
| cp *.log /work/ 2>/dev/null || true | ||
| if [ -d proptest-regressions ]; then | ||
| cp -r proptest-regressions /work/rdb-proptest-regressions | ||
| fi | ||
| popd | ||
|
|
||
| # BGP proptest suite | ||
| pushd bgp | ||
| PROPTEST_CASES=1000000 cargo nextest run --lib proptest | ||
| cp *.log /work/ 2>/dev/null || true | ||
| if [ -d proptest-regressions ]; then | ||
| cp -r proptest-regressions /work/bgp-proptest-regressions | ||
| fi | ||
| popd |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,6 +6,7 @@ | |
| #: rust_toolchain = "stable" | ||
| #: output_rules = [ | ||
| #: "/work/*.log", | ||
| #: "/tmp/*.db", | ||
| #: ] | ||
| #: | ||
|
|
||
|
|
||
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems odd to me that getting imported routes no longer requires an ASN as a router identifier. But i'll probably get to that later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is tracked in #525
I moved it under
ribinstead ofbgpbecause it is not a bgp-specific table. Static routes follow the same imported -> selected path and are un-queryable without a BGP router configured.