BGP: Connection Collision Resolution may be a sham

Aperta
#929 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
15/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
networking

Direzione di ricerca

Start with the deterministic_collision_resolution check in the Established state and the code that removes the losing connection from the ConnectionRegistry during ConnectionCollision to SessionSetup promotion, since the issue says the check can never be reached. Also trace how collisions are handled in OpenConfirm versus OpenSent, where the issue reports different numbers of OPENs needed to resolve. The issue does not settle the intended semantics, so the first step is a maintainer decision on what the knob should do; done means that decision is recorded and the code path matches it.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bgp Bug mgd needs testing rust

deterministic_collision_resolution is a knob that exists to allow an operator to express finer control over the FSM behavior during a Connection Collision if one connection progresses into Established before the other receives an OPEN message.

When set to true: the collision resolution process is performed to determine which of the two connections should be retained.
When set to false: the connection that entered Established wins unconditionally.

However, in the current codebase there isn't actually a way for deterministic_collision_resolution to take effect... because when a connection is promoted to Established (indirectly, via SessionSetup first) from ConnectionCollision, the remaining connection is closed and removed from the ConnectionRegistry.

The other reason we can't hit deterministic_collision_resolution is because we do not accept new connections in Established state. In theory, full compliance with RFC 4271's CollisionDetectEstablishedStateoptional session attribute would mean we allow new connections... but I don't see a reason to open that can of worms.

Since the remaining connection was closed, it is impossible to hit the deterministic_collision_resolution logic we have in Established since it's tucked behind a ConnectionId check. Unregistered connection == failed check.

If we're being honest, there are other problems with ConnectionCollision that could also use revisiting. In particular, the codebase moved from lazy collision resolution (wait for both connections to get an OPEN) to eager collision resolution (react to the first OPEN)... but it didn't do so in a consistent fashion.
If we encounter a collision while the FSM is in OpenConfirm (i.e. we have already received an OPEN on the existing connection), we wait for an OPEN to also arrive on the new connection (or move the existing connection into SessionSetup/Established upon receipt of a KEEPALIVE) -- so we resolve the collision after receiving two OPENs in total.
Whereas a collision encountered while the FSM is in OpenSent results in us immediately resolving the collision when either of the two connections receives an OPEN -- so we resolve the collision after receiving one OPEN in total.

So I guess we're lazy if we encounter the collision while in OpenConfirm, but eager if we encounter the collision while in OpenSent?
Overall, this area of the code needs some work... thanks a lot, past Trey.

Lingua principale
Rust
Stelle
100
Fork
8
Merge medio
2g 1h
PR unite (30g)
18

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di oxidecomputer/maghemite

Tutte le issue di oxidecomputer/maghemite

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.