In general, keepalive slots are released after result of
stopping has returned. However, for network disconnect case,
the service side cannot communicate with network agent since
the async channel is broken.
Clean up keepalive slots right after stop in this case.
Bug: 132341736
Test: 1. atest com.android.server.ConnectivityServiceTest \
#testNattSocketKeepalives --generate-new-metrics 100
2. atest FrameworksNetTests --generate-new-metrics 10
Change-Id: Ia30741f71fa72fc117e071976fd73991fa3c9535
This reverts commit cece56e3ce.
Reason for revert: Adds dependency between IpSecService and
ConnectivityService may lead to future deadlock
problems. Uses a simpler approach instead,
hence the solution is not needed.
See aosp/954040.
Change-Id: Ibff278a6eee666cd85dba81c2bed94d568679b02
Public APIs for creating unprivileged NATT socket keepalive
might allow users to exhaust resource if malicious apps try
to create keepalives with fd which is not created by
IpSecService through binder call. Thus, this change add
customizable limitation per uid to prevent resource exhaustion
attack.
Bug: 129371366
Bug: 132307230
Test: atest FrameworksNetTests
Change-Id: Ibcb91105e46f7e898b8aa7c2babc3344ef2c6257
This change specifies the required minimum supported keepalives
in SDK, and allows OEMs to customize supported keepalive count
per network through resource overlay.
Bug: 129371366
Test: 1. m -j doc-comment-check-docs
2. atest FrameworksNetTests
Change-Id: I0218f3674628c13ead63fc9a873895ba7f113033
am: d9b68e236b -s ours
am skip reason: change_id I4c54b003a733eb0b1e4fd8674ed13081b1bef8e3 with SHA1 e0e2ca979c is in history
Change-Id: I3a61f64da1fc5d376da06a81ce8a35bac09d4481
The onUnavailable semantics promise that it is equivalent to calling
the unregister callback method. But - it doesn't unregister the callback
allowing it to be reused. Fixed.
Additionally, modified the unregisterNetworkCallback method to not fail
on duplicate unregistration (since a callback could now self
unregister). Instead simply print a log.
Bug: 130651445
Test: atest ConnectivityServiceTest
Merged-In: I4c54b003a733eb0b1e4fd8674ed13081b1bef8e3
Change-Id: I4c54b003a733eb0b1e4fd8674ed13081b1bef8e3
The onUnavailable semantics promise that it is equivalent to calling
the unregister callback method. But - it doesn't unregister the callback
allowing it to be reused. Fixed.
Additionally, modified the unregisterNetworkCallback method to not fail
on duplicate unregistration (since a callback could now self
unregister). Instead simply print a log.
Bug: 130651445
Test: atest ConnectivityServiceTest
Change-Id: I4c54b003a733eb0b1e4fd8674ed13081b1bef8e3
This reverts commit 8368fe9fe0.
Reason for revert: Adds dependency between IpSecService and
ConnectivityService may lead to future deadlock
problems. Uses a simpler approach instead,
hence the solution is not needed.
See aosp/954040.
Change-Id: If6d537a39595cf132d3ed81d4eaac6700f5f0ab3
This patch adds checks to ensure that the IPSEC_TUNNEL feature flag is
enabled.
Bug: 117183273
Test: Compiles & tests passing
Change-Id: I2699dda29e1eed139bc6fd1b70071e5ab33cad88
am: 816b29a1bd -s ours
am skip reason: change_id I9b65a2eef94567d2b79a9955619938e64906080d with SHA1 b547b7b4df is in history
Change-Id: I05a3e1b581d287022f9843a07f2ba76609fd663c
am: c3216377b5 -s ours
am skip reason: change_id I49c35541eb21e91f8c36215456df703d2fe70d2c with SHA1 d82b2c24b3 is in history
Change-Id: Id22f11ec1e377c801ea5b7dd9692c6243907fa9e
am: 78bc2fb752 -s ours
am skip reason: change_id Idaa7238a5c9acdae9f6cff13095ee9436c7c92c8 with SHA1 3d6d36ebb7 is in history
Change-Id: I0db6221a54e4aba83fc792561e48c9d448163239
am: d665afbc4b -s ours
am skip reason: change_id I9b9a51dc5dc06c90229fb36c34c24258991c4146 with SHA1 15400f216d is in history
Change-Id: Ie1cdb9a928f97681ab4083b68db3fd453b0399e5
am: 254c92d0f7 -s ours
am skip reason: change_id I9f708a252ab606b782f5f828dce8c1690c3703bf with SHA1 42272ed304 is in history
Change-Id: Ia333cf3cbe2368146ac701bb83e52e131291503c