Simplify tethering active session counting
The previous implementation for tracking tethering active sessions
was overly complex. This commit simplifies the logic by:
- Moving the counting to the BpfCoordinatorShimImpl (31 impl)
where rule addition and deletion are centralized.
- Eliminating the unnecessary Android version check (S+) as
the 31 shim only runs on S+.
- Relocating the tracking counters from
ConntrackEventConsumer to the shim class, improving code
locality and encapsulation.
This change addresses the feedback from the networking mainline
release council and resolves a release blocker.
Test: atest TetheringTests:com.android.networkstack.tethering.BpfCoordinatorTest
Fix: 370652384
Change-Id: I70ca58fc45694c738745d7a872272641a62551fd
5 files changed