Skip to content

Commit 1dae1cd

Browse files
authored
Fix pfctl executable path in PacketFilter DNS reload (#1128)
## 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
1 parent 113a6ec commit 1dae1cd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Sources/Services/ContainerAPIService/Client/PacketFilter.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ public struct PacketFilter {
183183
let reloadProcess = Foundation.Process()
184184
var reloadStatus: Int32
185185

186-
reloadProcess.executableURL = URL(fileURLWithPath: "/sbin/reloadProcess")
186+
reloadProcess.executableURL = URL(fileURLWithPath: "/sbin/pfctl")
187187
reloadProcess.arguments = ["-f", configURL.path]
188188
reloadProcess.standardOutput = null
189189
reloadProcess.standardError = null

0 commit comments

Comments
 (0)