From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=fail (p=none dis=none) header.from=gmail.com Received: from mail-dy1-x132f.google.com (mail-dy1-x132f.google.com [IPv6:2607:f8b0:4864:20::132f]) by passt.top (Postfix) with ESMTPS id 827C25A026E for ; Fri, 04 Dec 2026 08:31:26 +0100 (CET) Received: by mail-dy1-x132f.google.com with SMTP id 5a478bee46e88-3282db206d3so1361456eec.0 for ; Thu, 03 Dec 2026 23:31:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796369485; x=1796974285; darn=passt.top; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=5ZP1Sjq/GkXjE34ZqJnFQPICF4fU6tyGzKnARjwZ8EU=; b=JvwhEJVI7LbDbVWJnTfVOZvmeMaymP224cS9Wau2eqBXnQVecb5dLQOgmg/X7UqJLU eWm40yjaeqlJUEmz8pUhgZwrNpTPcLuBDPB79QY9NJ4kfhJT7CBZq6n/9gdjusi74u7U fsCtdq8I+djZPRBsU4a1nvpL+QPzZ1yFZL+bMqXRirUomDrbC8axI9elRCt3NDWrDjhk Dx6aoRhQHb+yhwy+bs5Tll76vVXq42S15DcG/yJ30xyfAZWHp0LIJC1rUTPQQEmTGUwB cXIfRy3+axucK/bcPIY66dqBfCOd+ehFUnf7mRQISdlUaXcMnDGaJaT3WFzg2gnzk4Vo HCPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796369485; x=1796974285; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=5ZP1Sjq/GkXjE34ZqJnFQPICF4fU6tyGzKnARjwZ8EU=; b=f/CF4Iq4IKhRBYqCgncUst2ahjs9PH+JHMiI79kkTcErrH3NZfuaFHSl8ifjMKQUoO /nY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ILEHVAg7zIL1Rk6zr8PsTc47XTcgASy2HPzdoWWAh9EYPRqfWFPKicsx+Y4s= X-Received: by 2002:a05:7301:d188:b0:368:2548:c08b with SMTP id 5a478bee46e88-3875213aaa9mr1231657eec.21.1796369484704; Thu, 03 Dec 2026 23:31:24 -0800 (PST) Received: from localhost ([2401:4900:ac83:740:c496:868c:8c47:7d5]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-3875218c6a6sm4946702eec.5.2026.12.03.23.31.22 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 03 Dec 2026 23:31:24 -0800 (PST) From: Aditya Merchant To: passt-dev@passt.top Subject: [PATCH 0/3] DNS forwarding: follow nameserver changes in passt mode too Date: Fri, 4 Dec 2026 13:01:16 +0530 Message-ID: <20261204073119.31027-1-adityamerchant08@gmail.com> X-Mailer: git-send-email 2.50.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-MailFrom: adityamerchant08@gmail.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation Message-ID-Hash: O43AFHFTEXUP25YJ5NIMZHBAXS7P45IV X-Message-ID-Hash: O43AFHFTEXUP25YJ5NIMZHBAXS7P45IV X-Mailman-Approved-At: Fri, 04 Dec 2026 08:54:10 +0100 CC: Stefano Brivio , 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: These are the follow-ups Stefano suggested after applying "conf: Follow changes to the host nameserver used for DNS forwarding": - 1/3 rewords the passt.1 sentence that was hard to read - 2/3 forgets a nameserver once resolv.conf doesn't list one for that IP version anymore, as we do at start-up - 3/3 follows changes in passt mode too, which needs openat() in passt's seccomp profile (34 to 35 syscalls on x86_64, pasta stays at 43) Tested on Kali (arm64, Linux 7.1) with the AppArmor profiles enforcing, using a small script that acts as a guest on passt's socket and sends DNS queries to the --dns-forward address. In passt mode, new queries reach the new nameserver after resolv.conf is replaced by rename, rewritten in place, filled in after starting without a nameserver, or replaced through a link into /run/resolvconf. With --dns-host, the address stays fixed. Once the nameserver is removed, queries aren't redirected anymore, and they are again once one is listed. Without the AppArmor rule that 3/3 moves to the passt abstraction, passt can't read resolv.conf under /run. pasta behaves as before, except that it now forgets a removed nameserver as well. The extended test passes, and its new cases fail on current master. 'make cppcheck' and 'make clang-tidy' pass. The SELinux modules build against Fedora 45's policy, but I couldn't try them with SELinux enforcing. Aditya Merchant (3): passt.1: Say plainly which nameserver new DNS flows go to conf: Forget host nameserver once it's removed from resolv.conf conf: Follow changes to the host nameserver in passt mode, too README.md | 2 +- conf.c | 19 +++++++++++++++---- contrib/apparmor/abstractions/passt | 4 ++++ contrib/apparmor/abstractions/pasta | 4 ---- contrib/selinux/passt.te | 4 ++++ passt.1 | 6 +++--- test/pasta_options/dns_host_follow | 23 +++++++++++++++++++++-- 7 files changed, 48 insertions(+), 14 deletions(-) -- 2.50.1 (Apple Git-155)