oxidecomputer / oxidecomputer/maghemite
Reject invalid `nexthop` addresses
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 94
- Forks
- 6
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 12
Description
Property-based tests hitting the mgd static routing API produced some routes with a nexthop of 127.0.0.1; @rcgoodfellow pointed out that we ought to be rejecting this in both maghemite and omicron.
We've recently added some IpAddr-wrapping types in omicron that do this kind of validation; e.g., RouterIpAddr, which rejects localhost, multicast, ipv4-mapped-ipv6, etc. addresses. If we can come up with reasonable names, we could lift those types up to oxnet and reuse them across both omicron and maghemite.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the maghemite and omicron implementations of the mgd static routing API, then read omicron's RouterIpAddr validation in sled-agent/types/versions/src/stronger_bgp_unnumbered_types/early_networking.rs. Determine whether the validated address types can move to oxnet and be reused by both projects. Done means invalid nexthop addresses such as 127.0.0.1 are rejected in both maghemite and omicron.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100