Files
moby/libnetwork
Rob Murray d29767431c Use host netns for host's ext-dns servers
The internal resolver needs to know whether to make requets
to external DNS servers from the container's network namespace
or the host's.

The original rule was that requests were always made from the
container's namespace, unless the nameserver was on a localhost
address on the host. IPv6 nameservers were left in the container's
/etc/resolv.conf.

Commit 4e8d9a4 modified that so that IPv6 nameservers were also
used as external nameservers. The internal resolver accessed
them from the host namespace if the container's initial set of
endpoints were IPv4-only, or the nameserver address contained
a zone-id, (or the nameserver was on the IPv6 loopback address).

That would break if initial IPv6 endpoints were disconnected from
the container, leaving it with no IPv6 address.

Once IPv6-only networks are allowed, another exception would need
to be made for IPv4 nameservers (they'd need to be accessed from
the host's namespace).

Instead of doing that ... this change simplifies things, if a
nameserver address is read from the host's /etc/resolv.conf, it'll
work in the host's namespace. So, the rule is now simply that
nameservers read from the host's resolv.conf are accessed from the
host's namespace. DNS servers added as overrides ('--dns') are
accessed from the container's namespace (as before).

Signed-off-by: Rob Murray <rob.murray@docker.com>
2024-08-06 10:33:04 +01:00
..
2024-03-07 10:57:03 +01:00
2024-06-27 23:18:48 +02:00
2024-06-13 14:59:54 +02:00
2024-07-26 16:26:34 +01:00
2024-06-27 23:18:48 +02:00
2024-06-14 15:25:07 +02:00
2024-06-11 22:33:58 +01:00
2024-06-27 23:18:48 +02:00
2024-06-14 15:25:07 +02:00
2024-02-29 23:27:00 +00:00
2024-06-13 14:59:54 +02:00

libnetwork - networking for containers

Libnetwork provides a native Go implementation for connecting containers

The goal of libnetwork is to deliver a robust Container Network Model that provides a consistent programming interface and the required network abstractions for applications.

Design

Please refer to the design for more information.

Using libnetwork

There are many networking solutions available to suit a broad range of use-cases. libnetwork uses a driver / plugin model to support all of these solutions while abstracting the complexity of the driver implementations by exposing a simple and consistent Network Model to users.

Contributing

Want to hack on libnetwork? Docker's contributions guidelines apply.

Code and documentation copyright 2015 Docker, inc. Code released under the Apache 2.0 license. Docs released under Creative commons.