oxidecomputer / oxidecomputer/maghemite

bgp: improve handling of large variable-length capabilities

Open
#616 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bgp Bug want
Dominant language
Rust
Stars
94
Forks
6
Avg merge
1d 8h
Merged PRs (30d)
12

Description

In general, encoders should be infallible since we are representing valid internal protocol state as a stream of bytes. Any invalid state (e.g. trying to stuff more things into a Message or field than can fit) should be handled well before the attempt to encode it.

For example, if the local configuration would result in a capability length greater than what can be encoded (for capabilities: 1-byte field containing the length in octets), then we should have handlers for splitting that state into multiple capabilities.

Similarly, if a local configuration would result in so many capabilities that an Open message would exceed the max encode-able size of an Open then we should inform the operator so they can take action to reduce the size of the config (or we could error it out before it becomes a problem).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the BGP capability and Open-message encoders, then trace how variable-length capabilities and the maximum Open-message size are represented. Done should prevent encodable state from reaching an infallible encoder by splitting oversized capabilities and reporting configurations that exceed the Open-message limit.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.