From: Stefano Brivio <sbrivio@redhat.com>
To: Jon Maloy <jmaloy@redhat.com>
Cc: Aditya Merchant <adityamerchant08@gmail.com>,
passt-dev@passt.top, David Gibson <david@gibson.dropbear.id.au>,
Paul Holzinger <pholzing@redhat.com>,
Laurent Vivier <lvivier@redhat.com>
Subject: Re: [PATCH 2/3] conf: Forget host nameserver once it's removed from resolv.conf
Date: Fri, 04 Dec 2026 23:36:35 +0100 (CET) [thread overview]
Message-ID: <20261204233634.003fcf9f@elisabeth> (raw)
In-Reply-To: <d984905f-8752-4c96-a6bd-76c47c3c8fdf@redhat.com>
On Fri, 4 Dec 2026 17:15:24 -0500
Jon Maloy <jmaloy@redhat.com> wrote:
> On 2026-12-04 02:31, Aditya Merchant wrote:
> > When we follow changes to resolv.conf, and it doesn't list a nameserver
> > for an IP version anymore, conf_resolv_update() keeps the one we had
> > before, and we keep redirecting DNS queries to it.
> >
> > That's not what we do at start-up, where get_dns() leaves .dns_host
> > unspecified if there's no nameserver for that IP version, and it's
> > probably not what users expect either: a nameserver might have been
> > removed for a reason. Clear .dns_host in that case, so that we stop
> > redirecting DNS queries for that IP version, until a nameserver is
> > listed again.
>
> The logic looks right to me. One thing that might be worth spelling
> out, though: clearing .dns_host doesn't make queries to the
> --dns-forward address fail, it just stops redirecting them, so they
> go through nat_outbound() like any other packet. If that address is
> the --map-host-loopback one, as we set it up by default when the host
> uses a local resolver, they now go to the host's 127.0.0.1:53.
All expected, so far.
> If we have an explicit --dns-forward address, they're sent to that
> address as such, and will usually time out.
Desired, if the address is removed.
> This is consistent with starting without a nameserver, but it is actually
> a visible change for a running instance.
I think it's consistent with the description from the man page, as
amended in the previous series from Aditya. That was the one
introducing the biggest visible change anyway.
> Maybe this should be mentioned in the commit message?
Too late at this point but I think it's actually obvious enough, and
also implicit in the "stop redirecting DNS queries" part.
--
Stefano
next prev parent reply other threads:[~2026-12-04 22:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 7:31 [PATCH 0/3] DNS forwarding: follow nameserver changes in passt mode too Aditya Merchant
2026-12-04 7:31 ` [PATCH 1/3] passt.1: Say plainly which nameserver new DNS flows go to Aditya Merchant
2026-12-04 21:35 ` Jon Maloy
2026-12-04 7:31 ` [PATCH 2/3] conf: Forget host nameserver once it's removed from resolv.conf Aditya Merchant
2026-12-04 22:15 ` Jon Maloy
2026-12-04 22:36 ` Stefano Brivio [this message]
2026-12-04 7:31 ` [PATCH 3/3] conf: Follow changes to the host nameserver in passt mode, too Aditya Merchant
2026-12-04 22:31 ` [PATCH 0/3] DNS forwarding: follow nameserver changes in passt mode too Stefano Brivio
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261204233634.003fcf9f@elisabeth \
--to=sbrivio@redhat.com \
--cc=adityamerchant08@gmail.com \
--cc=david@gibson.dropbear.id.au \
--cc=jmaloy@redhat.com \
--cc=lvivier@redhat.com \
--cc=passt-dev@passt.top \
--cc=pholzing@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://passt.top/passt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).