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 added 2 commits April 29, 2026 00:57
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 2b15f1b to 16cf565 Compare April 28, 2026 23:25
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

1 participant