oxidecomputer / oxidecomputer/dendrite

NAT encapsulated packets originate from `::`

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

Nobody has claimed this yet.

Dominant language
Rust
Stars
20
Forks
3
Avg merge
3d 11h
Merged PRs (30d)
4

Description

https://github.com/oxidecomputer/dendrite/blob/f9fba02fd5351f468b15bda21d83d6dedae90818/dpd/p4/sidecar.p4#L507-L530

I ran into this while writing up tests for ICMP generation in OPTE and double-checking what fields to expect in various cases -- the case in question being generating ICMP hairpins for traffic from the external network.

The lack of a useful source address makes it challenging/fiddly to ensure that inner ICMP packet-too-big traffic goes back via the switch the original packet came from. The switch will only decapsulate packets which have one of its switch addresses as the outer IPv6 destination, so mirroring the source/destination addresses on the encap will lead to unroutable packets. As a result we have to perform a V2B lookup on the inner destination to fill this field, which may return the address of the other switch.

A minor point is that the inner source mac could also be set to something like oxide_vpc::engine::overlay::TUNNEL_ENDPOINT_MAC (A8:40:25:77:77:77), for symmetry with how OPTE sends packets to boundary services.

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 with dpd/p4/sidecar.p4 lines 507-530 and trace how NAT-encapsulated packets get their outer IPv6 source and destination addresses. Review the OPTE ICMP-generation tests mentioned in the issue to establish expected hairpin behavior. Done means the generated encapsulation has a useful source address and the relevant cases are covered by tests.

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
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.