apple / apple/container

[Request]: IPv6: autoconfigure DNS proxy.

Open
#1,004 2 comments 0 reactions 1 assignee Claimed by @jglogan View on GitHub
enhancement network
Dominant language
Swift
Stars
49.9k
Forks
1.8k
Avg merge
1d 20h
Merged PRs (30d)
22

Description

### Feature or enhancement request details

When the sandbox service bootstraps the container VM, it autoconfigures the IPv4 DNS server address to use the vmnet proxy server at the gateway address of the first running NAT bridge found. We should also autoconfigure the IPv6 nameserver so that IPv6-only containers can function.

To do this for the IPv6 DNS proxy, it's necessary to wait for the NAT bridge to be fully materialized (at the point where the IPv6 address is assigned and secured as viewed in `ifconfig` or `scutil`). This only happens after the first interface is attached to the network, which only happens after the VM with that first interface has started.

Discovering the address isn't really straightforward today - it's necessary to use the `SystemConfiguration` framework to find the network whose IPv6 prefix matches the `container` network, registering for notifications and waiting until it appears in the case of the first container on the network.

As part of this work we should document that SLAAC only works on IPv6 subnets with a /64 prefix. For other networks the address must be configured manually, which we do not support at present (see #751).

### Code of Conduct

- [x] I agree to follow this project's Code of Conduct

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.