Skip to content

Builder.equals ignores metered flag and search domains, leaving stale VPN interfaces #763

Description

@kasnder

Builder.equals (ServiceSinkhole.java:4130-4176, inherited from NetGuard) compares only activeNetwork, networkInfo type, MTU, addresses, routes, DNS and disallowed apps. It ignores:

  • metered flag — a meteredness flip on the same Network triggers a reload, but the builders compare equal, so re-establishment is skipped and setMetered never reaches the live interface (apps see the VPN as unmetered over a now-metered network);
  • search domains (addSearchDomain);
  • ePDG excludeRoutes added per rebuild since API 33.

Also minor: unchecked cast (Builder) obj before the null check, and both-null networkInfo compares unequal, forcing needless interface replacements.

Low impact in TrackerControl today (no per-network allow/deny split), but a genuine stale-interface state. Fix: compare the missing fields or hash the fully built builder.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions