Use SystemPath for PacketFilter - #18
Closed
chrisgeo wants to merge 0 commit into
Closed
Conversation
chrisgeo
force-pushed
the
feat/chaos-1449-packetfilter-filepath
branch
from
May 8, 2026 22:14
db825ef to
beb1592
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Converts
PacketFilterfromURLtoSystemPackage.FilePathfor filesystem path handling, mirroring the pattern landed in apple#1480 forHostDNSResolver.Changes
configURL/anchorsURL→configPath/anchorsPath(FilePath)defaultConfigPath/defaultAnchorsPathnowFilePathFileManagercalls switch fromatPath: url.pathtoatPath: path.stringString(contentsOfFile: path.string, …)in place ofString(contentsOf: URL, …)Out of scope
Process.executableURL = URL(fileURLWithPath: "/sbin/pfctl")—Foundation.ProcessrequiresURL, kept as-is.Context
Test plan
swift test --filter PacketFilterTest— both tests pass (testRedirectRuleUpdate,testPacketFilterReinitialize)swift test --filter ContainerAPIClientTests— all 171 tests in 11 suites pass (no neighbor regressions)swift-format lint --strict --configuration .swift-format-nolint— cleanNext steps
After merge here, forward to apple/container as the upstream PR (filing the upstream
[Request]: TECH DEBT - Convert PacketFilter to FilePathissue first, mirroring apple#1479).