Skip to content

Add bridge mode networking#709

Open
torarnv wants to merge 2 commits intoapple:mainfrom
torarnv:add-bridge-mode-networking
Open

Add bridge mode networking#709
torarnv wants to merge 2 commits intoapple:mainfrom
torarnv:add-bridge-mode-networking

Conversation

@torarnv
Copy link
Copy Markdown

@torarnv torarnv commented Apr 28, 2026

Fixes #457

@torarnv
Copy link
Copy Markdown
Author

torarnv commented Apr 28, 2026

Early RFC. See also apple/container#1463

@torarnv torarnv force-pushed the add-bridge-mode-networking branch from 2b15f1b to 16cf565 Compare April 28, 2026 23:25
@dcantah
Copy link
Copy Markdown
Member

dcantah commented May 3, 2026

Some quick fixes so we can get some CI signal:

  1. We require all commits be signed (ssh/gpg)
  2. Run make fmt and the formatting yell from our CI should go poof

@torarnv torarnv force-pushed the add-bridge-mode-networking branch from 16cf565 to a898185 Compare May 4, 2026 18:25
torarnv added 2 commits May 4, 2026 20:41
Adds BridgedNetworkInterface, which uses VZBridgedNetworkDeviceAttachment
to place a container on the host's physical network. The IP address is
assigned by the upstream DHCP server rather than our allocation pool, so
ipv4Address is always nil for this type.

Makes Interface.ipv4Address optional (CIDRv4?) to accommodate interfaces
whose address is not known at configuration time. Updates all existing
conformers (NATInterface, NATNetworkInterface, VmnetNetwork.Interface) and
guards the static address/route setup in LinuxContainer and LinuxPod behind
an ipv4Address nil-check.

Fixes apple#457
When configureDns is called with an empty nameservers list or no domain,
read /proc/net/pnp (written by the kernel IP_PNP DHCP client) and use
any nameserver and domain lines found there. The two are filled in
independently, so an explicit nameserver does not prevent the domain
from being read from pnp. This provides automatic DNS configuration
for bridge-mode containers without a new RPC or proto change.
@torarnv torarnv force-pushed the add-bridge-mode-networking branch from a898185 to 4e02fed Compare May 4, 2026 18:42
@torarnv
Copy link
Copy Markdown
Author

torarnv commented May 4, 2026

  1. We require all commits be signed (ssh/gpg)
  2. Run make fmt and the formatting yell from our CI should go poof

Done 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Request]: Add support for Bridged Networking

3 participants