Repository navigation
Car Report: scrub addresses in the iptables dump like the routes - #482
Merged
Merged
Conversation
The rules only had MACs taken out. Android's own chains (netd's st_mangle_EXEMPT) hold the unit's current mobile-data address and its carrier's servers, so a 2024 Ioniq 5's reports carried its 100.x address in full while the routes showed 100.x.x.x. Public and carrier-NAT addresses in the rules now become a.b.x.x; private ones, ports and policies stay. Checked on that car's real dump: only the 6 st_mangle_EXEMPT lines with those addresses change. net-test.sh covers it.
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.
Not tied to any release.
Problem
The Car Report's network section scrubs
ip addr,ip routeandip rule: public and carrier-NAT addresses becomea.b.x.x. The iptables dump only had MAC addresses taken out.Android's own
st_mangle_EXEMPTchain is filled in at runtime with:So a 2024 Ioniq 5 report (US 260903) carried
100.x.y.zin full in the rules, while its routes showed100.x.x.x.Change
NetReportruns the iptables output (-Sand the counters) through the samescrub()as the routes.10/8,172.16/12,192.168/16, link-local, loopback, multicast and netmasks.Tested
core/runtime/net-test.sh(98 ok) has new checks:st_mangle_EXEMPTis scrubbed;st_mangle_EXEMPTlines holding those addresses change.