From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTP id 3771D5A0265 for ; Thu, 3 Nov 2022 08:10:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667459407; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PSBRCisE4YyUu3AigEiRKysmmy0VTsuV/iwcWxnIjck=; b=eptVYEzTK8bqNnIJuA1k30aWxYF6XsNhTTNU1DsKJvAgm+Ehw/nkOwfGYlqON54XcZpj/d So0zuYBwKT7BRuv2gG6XkiS8RD6z7snc5afP8HYA33cXOxJ8GIqa6j0mtryzFatLgvnHR1 RZyEGA/yM+IoSmTj5jsUFGTcNPZ5ndk= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-380-1RTn94xRNZG9H3cB5jPTaQ-1; Thu, 03 Nov 2022 03:10:04 -0400 X-MC-Unique: 1RTn94xRNZG9H3cB5jPTaQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D30D0185A7A8; Thu, 3 Nov 2022 07:10:03 +0000 (UTC) Received: from maya.cloud.tilaa.com (ovpn-208-31.brq.redhat.com [10.40.208.31]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8A61940C83AD; Thu, 3 Nov 2022 07:10:03 +0000 (UTC) Date: Thu, 3 Nov 2022 08:10:00 +0100 From: Stefano Brivio To: passt-dev@passt.top, David Gibson Subject: Re: [PATCH v2 2/3] conf: Split the notions of read DNS addresses and offered ones Message-ID: <20221103081000.0bab23a9@elisabeth> In-Reply-To: <20221103063341.401251-3-sbrivio@redhat.com> References: <20221103063341.401251-1-sbrivio@redhat.com> <20221103063341.401251-3-sbrivio@redhat.com> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: 7OF6BDXRXCNFDQJAPYTEYPVX3ZZ3AYKB X-Message-ID-Hash: 7OF6BDXRXCNFDQJAPYTEYPVX3ZZ3AYKB X-MailFrom: sbrivio@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Paul Holzinger X-Mailman-Version: 3.3.3 Precedence: list List-Id: Development discussion and patches for passt Archived-At: <> Archived-At: List-Archive: <> List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Thu, 3 Nov 2022 07:33:40 +0100 Stefano Brivio wrote: > With --dns-forward, if the host has a loopback address configured as > DNS server, we should actually use it to forward queries, but, if > --no-map-gw is passed, we shouldn't offer the same address via DHCP, > NDP and DHCPv6, because it's not going to be reachable. > > Problematic configuration: > > * systemd-resolved configuring the usual 127.0.0.53 on the host: we > read that from /etc/resolv.conf > > * --dns-forward specified with an unrelated address, for example > 198.51.100.1 > > We still want to forward queries to 127.0.0.53, if we receive one > directed to 198.51.100.1, so we can't drop 127.0.0.53 from our list: > we want to use it for forwarding. At the same time, we shouldn't > offer 127.0.0.53 to the guest or container either. > > With this change, I'm only covering the case of automatically > configured DNS servers from /etc/resolv.conf. We could extend this to > addresses configured with command-line options, but I don't really > see a likely use case at this point. > > Signed-off-by: Stefano Brivio Oops, disregard this, I botched the rebase in conf.c. -- Stefano