moby/integration
Rob Murray 17b8631545 Enable DNS proxying for ipvlan-l3
The internal DNS resolver should only forward requests to external
resolvers if the libnetwork.Sandbox served by the resolver has external
network access (so, no forwarding for '--internal' networks).

The test for external network access was whether the Sandbox had an
Endpoint with a gateway configured.

However, an ipvlan-l3 networks with external network access does not
have a gateway, it has a default route bound to an interface.

Also, we document that an ipvlan network with no parent interface is
equivalent to a '--internal' network. But, in this case, an ipvlan-l2
network was configured with a gateway. So, DNS proxying would be enabled
in the internal resolver (and, if the host's resolver was on a localhost
address, requests to external resolvers from the host's network
namespace would succeed).

So, this change adjusts the test for enabling DNS proxying to include
a check for '--internal' (as a shortcut) and, for non-internal networks,
checks for a default route as well as a gateway. It also disables
configuration of a gateway or a default route for an ipvlan Endpoint if
no parent interface is specified.

(Note if a parent interface with no external network is supplied as
'-o parent=<dummy>', the gateway/default route will still be set up
and external DNS proxying will be enabled. The network must be
configured as '--internal' to prevent that from happening.)

Signed-off-by: Rob Murray <rob.murray@docker.com>
2024-04-10 08:50:57 +01:00
..
build integration/build: Use fsutil.NewFS 2024-02-27 11:26:10 +01:00
capabilities api/types: move ContainerLogsOptions to api/types/container 2023-10-12 11:30:12 +02:00
config Don't run tests twice 2023-09-19 11:37:55 +02:00
container fix duplicate words (dupwords) 2024-03-07 10:57:03 +01:00
daemon integration: Reset OTEL_EXPORTER_OTLP_ENDPOINT for sub-daemons 2024-02-28 10:48:07 +01:00
distribution bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-11 00:06:42 +01:00
image c8d/list: Add a test case for images sharing a top layer 2024-03-20 13:17:56 +01:00
internal Move dummy DNS server to integration/internal/network 2024-04-04 12:02:22 +01:00
network Enable DNS proxying for ipvlan-l3 2024-04-10 08:50:57 +01:00
networking Move dummy DNS server to integration/internal/network 2024-04-04 12:02:22 +01:00
plugin tests: add plugin install test w/ digest 2024-02-01 23:00:38 +00:00
secret Wire up tests to support otel tracing 2023-09-07 18:38:22 +00:00
service fix duplicate words (dupwords) 2024-03-07 10:57:03 +01:00
session integration(-cli): remove skips for old daemon versions (<20.10) 2023-12-05 01:03:50 +01:00
system integration: Remove Parallel from TestDiskUsage 2024-03-18 12:11:34 +01:00
testdata/https Update test certificates 2021-05-18 09:43:21 +02:00
volume fix duplicate words (dupwords) 2024-03-07 10:57:03 +01:00
doc.go Add canonical import comment 2018-02-05 16:51:57 -05:00