feat: generalize bgp server to allow any net.Listener#398
feat: generalize bgp server to allow any net.Listener#398tobikris wants to merge 4 commits intobio-routing:masterfrom
Conversation
this allows to implement in-memory bgp servers using the same code. they can be used for testing bio-routing as well as some other use cases.
Codecov Report
@@ Coverage Diff @@
## master #398 +/- ##
==========================================
+ Coverage 55.14% 58.55% +3.40%
==========================================
Files 147 147
Lines 7672 7702 +30
==========================================
+ Hits 4231 4510 +279
+ Misses 3245 2967 -278
- Partials 196 225 +29
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
I would like to add the router ID to all log lines originating from a BGP server instance. The direct calls are trivial, do you think I should do something similar for the deeper calls like the FSM logging? I would probably also like to be able to override the logger for each BGP server manually from the caller side. |
c8dd0e7 to
1167931
Compare
|
I have added a testcase to verify the correctness of multiple BGP speakers in one process. The test case is currently failing: However, I do not find the relevant code path responsible for this. @taktv6 @BarbarossaTM: Is my test premise valid in the first place? Only one path is expected, correct? The incorrect next-hop is probably caused by the singular cache structure being reused by multiple servers? |
|
Looking into this I'm wondering how this is caused. Even with just two instances it happens. |
|
Could it be both instance 1 and 2 initiate connections to each other and don't clean up the collision? |
This allows to implement in-memory bgp servers using the same code.
They can be used for testing bio-routing as well as some other use cases.