From 1dae1cdd56bb4ebd819ece1de2c038ff3b8ef7d4 Mon Sep 17 00:00:00 2001 From: w-ferg <43309695+w-ferg@users.noreply.github.com> Date: Sun, 1 Feb 2026 18:14:41 -0500 Subject: [PATCH] Fix pfctl executable path in PacketFilter DNS reload (#1128) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary The `reload()` method in `PacketFilter.swift` references `/sbin/reloadProcess` (the local variable name) instead of `/sbin/pfctl`. This causes all DNS create and delete operations to fail: ``` Error: internalError: "pfctl reload exec failed: "Error Domain=NSCocoaErrorDomain Code=4 "The file "reloadProcess" doesn't exist."" ``` ## Fix One-line change: `/sbin/reloadProcess` → `/sbin/pfctl` ## Testing Verified on macOS 26 (Tahoe) with Apple Silicon: - `sudo container system dns create test.sdc.internal --localhost 203.0.113.1` succeeds without error - Container can resolve and reach host services through the DNS redirect --- Sources/Services/ContainerAPIService/Client/PacketFilter.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Services/ContainerAPIService/Client/PacketFilter.swift b/Sources/Services/ContainerAPIService/Client/PacketFilter.swift index 2019f1dc..c53ef1d5 100644 --- a/Sources/Services/ContainerAPIService/Client/PacketFilter.swift +++ b/Sources/Services/ContainerAPIService/Client/PacketFilter.swift @@ -183,7 +183,7 @@ public struct PacketFilter { let reloadProcess = Foundation.Process() var reloadStatus: Int32 - reloadProcess.executableURL = URL(fileURLWithPath: "/sbin/reloadProcess") + reloadProcess.executableURL = URL(fileURLWithPath: "/sbin/pfctl") reloadProcess.arguments = ["-f", configURL.path] reloadProcess.standardOutput = null reloadProcess.standardError = null