From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=fail (p=quarantine dis=none) header.from=redhat.com Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTPS id C9E505A026E for ; Fri, 04 Dec 2026 23:36:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1796423799; 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=Gpwf0cAS/1JSpUM98cd+LYSAiGgcmUynVi+75bvK6pE=; b=HNEGfb27hIKVDf0BT4H0p/2uaxAxUJsfHTjnHjjLHZiw4FHZZS3MrGsVtLA1Yj6o5jK7Cy uUbBJH4xBL3LCieruTXM7+z8+9K2Lut0okPYGaWKstUKyN+8L7VE2zlng91R7CKG9ITyhc ayS3YVng96z8cGHCSbTLzM/GdLaube4= X-MC-Rep: binary re single Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-367-MnpY8HhcP0WaqM8WRmTUwg-1; Fri, 4 Dec 2026 22:36:38 +0000 X-MC-Unique: MnpY8HhcP0WaqM8WRmTUwg-1 X-Mimecast-MFC-AGG-ID: MnpY8HhcP0WaqM8WRmTUwg_1796423797 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-4bcda4c853aso1172168f8f.0 for ; Fri, 04 Dec 2026 14:36:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796423797; x=1797028597; h=date:content-transfer-encoding:content-type:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=Gpwf0cAS/1JSpUM98cd+LYSAiGgcmUynVi+75bvK6pE=; b=YcZfaOrje8lwICInYmQ5Lxt65Bdtz8+IPF/Q273GNfyb17oUL/nJP7oklEXdsZi+C4 BRXH7n7FPB0P350d5FyM3453yMcX4fw3WhkptTGZDF2TGHRUoIRay5BULvKv+jCFwh7s pfYS4Wv/FBABONkUJpme30tX+Rfvjj1v0jpaF9E7libeq/mlLNDoG6Mgmf3v+9LF9oWB nb3fhzZtSXK7LNtEj5+9zzb70HySnvQ0CrzvqO2R1qFS2CtCGtKj0eafOTAhXyvqmFYl jQ9dtcPva7wbwb1R87mtqjuOCUsN8t8ebk35P4LZ8X6QL+9+ed3eYqGLqgg2iOLY3PKn vhQw== X-Forwarded-Encrypted: i=1; AL+hErG4GpphF1Ni/mpnEe/XFharB5Yr2SvQMnM31b80+yO8w3JPwgQ3lZRGllFsyHFOGn0X7SsEiQsJB7g=@passt.top X-Gm-Message-State: AB4q+uG28BH3uouONM1e2KIkbuzTzVjEDrhMTO32x6Hugsw0URnMZp5p 5kZD3okGELdCOqPrmNh4HgsVQc7gmSKIN50JsDrCnfsqSD4p0eza/687McCUNylKTpUQvLzyw3N lHjlwZUCtWHm+kwXVUscr0liaotvsrMPBPVI0FRT9RL/WOiC2fLBL1A== X-Gm-Gg: AZFdTZd09Ckqse2JfVmuDWNbZ8Bm+x7bJayGnQu2Sqsu/FKG5xFpWL0Kym4kqOhFw3o nkRl3nrRwNVOmHQBlI8LqTOjcxCqNtl89lOo4we5euxipyct7MaloIP9dMkFYW0/rRHqquJL08v skSkPtdLuSfezx6qoFtDELZOvFiMddSePPGCZk5kVrr7BmgQ0zr6mrTo5uYjGECpnwGcsXkghxp LZXIONJszVdG1wyeYieMXyFL9QJeKOqGoGfELFyYMpgngKQA2ooaMPJ54QPTXKmyCJQMurDBRen KefZpsGby4yVDANZW2Hm4mU0JNjUc3f58hYmw82Isa7gYN1r+ZVMYxxwU7ZelO8FfWe2aU7bhx6 0FEB43SQOztDwsMAu79I6iXZlj5fUZ+qehaFj4GkTkl2S+frloFZmp9+OhfWzYA6/LyA= X-Received: by 2002:a05:6000:4708:b0:4cf:b071:837f with SMTP id ffacd0b85a97d-4d1e9b1f911mr6833383f8f.25.1796423796546; Fri, 04 Dec 2026 14:36:36 -0800 (PST) X-Received: by 2002:a05:6000:4708:b0:4cf:b071:837f with SMTP id ffacd0b85a97d-4d1e9b1f911mr6833349f8f.25.1796423796062; Fri, 04 Dec 2026 14:36:36 -0800 (PST) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [2a10:fc81:a806:d6a9::1]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4d16e1a59a3sm7611858f8f.7.2026.12.04.14.36.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Dec 2026 14:36:35 -0800 (PST) From: Stefano Brivio To: Jon Maloy Subject: Re: [PATCH 2/3] conf: Forget host nameserver once it's removed from resolv.conf Message-ID: <20261204233634.003fcf9f@elisabeth> In-Reply-To: References: <20261204073119.31027-1-adityamerchant08@gmail.com> <20261204073119.31027-3-adityamerchant08@gmail.com> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.49; x86_64-pc-linux-gnu) MIME-Version: 1.0 Date: Fri, 04 Dec 2026 23:36:35 +0100 (CET) X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: Su8QPctUl1UEBVCAz5NeypgIkAfKfaVX5__Kvc8lEZ8_1796423797 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: SBIC25KM7R7QA7UDLTOYG3JSTMH7HSEY X-Message-ID-Hash: SBIC25KM7R7QA7UDLTOYG3JSTMH7HSEY 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: Aditya Merchant , passt-dev@passt.top, David Gibson , Paul Holzinger , Laurent Vivier X-Mailman-Version: 3.3.8 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 Fri, 4 Dec 2026 17:15:24 -0500 Jon Maloy 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