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
This commit is contained in:
w-ferg
2026-02-01 15:14:41 -08:00
committed by GitHub
parent 113a6ec5ba
commit 1dae1cdd56
@@ -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