From ddd8abb9bea7f98e38fde1c62a626ab0075749b0 Mon Sep 17 00:00:00 2001 From: Aditya R Date: Mon, 17 Oct 2022 14:15:10 +0530 Subject: [PATCH] libnetwork: add DNSServers to NetworkOptions Netavark now accets `dns_servers` for each container which allows containers to use custom DNS servers as resolvers instead of falling back to host's resolver. Following field allows callers to libnetwork to pass newly added field to `netavark` and `aarvark-dns` Actual feature implemented * https://github.com/containers/aardvark-dns/pull/240 * https://github.com/containers/netavark/pull/452 [NO NEW TESTS NEEDED] [NO TESTS NEEDED] Signed-off-by: Aditya R --- libnetwork/types/network.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libnetwork/types/network.go b/libnetwork/types/network.go index 2e8948998..402043400 100644 --- a/libnetwork/types/network.go +++ b/libnetwork/types/network.go @@ -226,6 +226,9 @@ type NetworkOptions struct { // Networks contains all networks with the PerNetworkOptions. // The map should contain at least one element. Networks map[string]PerNetworkOptions `json:"networks"` + // List of custom DNS server for podman's DNS resolver. + // Priority order will be kept as defined by user in the configuration. + DNSServers []string `json:"dns_servers"` } // PortMapping is one or more ports that will be mapped into the container.