oxidecomputer / oxidecomputer/maghemite

ddm: consider proper interface scope handling for link-local peers

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

Nobody has claimed this yet.

ddm rust
Dominant language
Rust
Stars
94
Forks
6
Avg merge
1d 8h
Merged PRs (30d)
12

Description

While working on some updates to FSM state tracking for DDM, I observed that ddmadm expire-peer takes an IP as an argument but no interface (name, addrobj, ifindex, or any other representation) even though we peer over link-local addresses.

That seemed odd to me so I dug a little bit further.

The expire-peers operation triggers an AdminEvent::Expire(addr) event that's sent to every interface FSM, who then compares that addr against their peer addr. The event wraps just an Ipv6Addr so it doesn't have any scope_id included, nor does it filter the FSM event just to one interface FSM that corresponds to the (IP, scope) tuple.

Additionally, routes are stored in the DB with just a peer address and no next-hop interface, which presumably means we are relying on NDP for installation to work properly.

While this has all worked well in practice, it would probably be a good idea to ensure proper handling of the same link-local IPs learned via multiple interfaces to be more robust in the face of an unforeseen issue (e.g. improper MAC assignment during sled manufacturing).

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 tracing the ddmadm expire-peer operation to AdminEvent::Expire(addr) and the interface FSMs that consume it. Review how peer routes are stored in the DB and how link-local addresses are represented across interfaces. Done means the expire operation and route handling distinguish the same link-local address on different interfaces, with coverage for the relevant behavior.

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
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.