Updated Tether4Value.java to utilize
java.net.InetAddress for relevant IP address fields.
These fields are correspondingly annotated with
Type.IpAddress for BPF map interactions.
Bug: 392509494
Test: atest TetheringTests
Flag: EXEMPT refactor
Change-Id: I6b5b1e176a47b55ad7482be15e4e2d8ee95ab1d1
Sarup Dalwaniauthored and Maciej Żenczykowskicommited 2025-09-04 00:52:31 -07:00
This reverts commit 3a6edd4e01.
Reason for revert: b/436710938,test gets nc before network is validated especially if the “mobile data always on” is disabled
Change-Id: Ie58d2a7eb707fd0baf5217004d01d3e56fad5449
Motomu Utsumiauthored and Android (Google) Code Reviewcommited 2025-09-03 01:04:16 -07:00
Add genrule for VCN metrics atoms and add wrapper utility class for logging using the generated java code, which currently has func for logging safe mode and VCN network validation states.
Bug: 288600040
Flag: EXEMPT METRICS
Test: atest CtsVcnTestCases, FrameworksVcnTests
Change-Id: Ia0f42c3435752399eb3ed480bfe62ffac31ccc1e
Change the type of src4 and dst4 from byte[] to Inet4Address in the
Tether4Key class. This simplifies the code by removing the need for
conversions between byte arrays and Inet4Address objects.
Bug: 392509494
Test: atest TetheringTests
Flag: EXEMPT refactor
Change-Id: I3072a8520c93042a25d1f60aa41bdfa5485062f6
This change modifies `DownloadHelper` to check if a URL is already
scheduled for download (in pending, running, or paused status) before
enqueuing a new request. If a download for the same URL is found, the
existing download ID is returned, avoiding redundant requests to the
`DownloadManager`.
Bug: 437217681
Test: atest NetworkSecurityUnitTests
Flag: EXEMPT BUGFIX
Change-Id: I64dd5473b4fdb23241f5e2503c65cb64db56617c
This will allow us to deprecate networkAddRoute.
Bug:412629841
Test: atest TetheringTests
Flag: EXEMPT Using device config kill-switch
Change-Id: I20e988f760b8ad22b51effdc1f0e204763c6e240
ConnectivityService would be centralized location for deciding local
network so for this effort passing isLocalRoute parameter to
routecontroller in netd for route addition, removal and modification.
Bug: 394308861
Test: Manually tested.
Test: atest ConnectivityCoverageTests
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.connectivityservice.CSLocalRouteTest
Test: atest netd_integration_test
Flag: EXEMPT Using device config kill-switch
Change-Id: I9f11882665375bba10fa369c2e25f374b5e63661
Before this CL, if the ip_ecn is 0b11, program returns without updating
byte_count->ceb
Test: TH
Bug: 440448408
Flag: EXEMPT tcpAccECN program is not used
Change-Id: I37aeddcb6807c43787b4f3ca0db26f47ffe190df
Likely not needed for kernel verifier happiness,
since even 1 'static' constant prevents .rodata from being
entirely empty/automatic and thus BTF-less.
Trivial follow up to go/ag/35341088
Bug: 441356399
Bug: 441436401
Test: TreeHugger
Flag: EXEMPT mainline/bug fix
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I396d1a4f2d47225707348f7c7dc3548cbba125a0
Maciej Żenczykowskicommited 2025-08-27 23:01:24 -07:00
This change enables the TETHERING_AND_P2P_GO_LOCAL_AGENT feature
on devices running Android 25Q4 or newer, in addition to being
controlled by the existing feature flag.
A new SdkUtil.isAtLeast25Q4() method is introduced to check for
the specific SDK version.
Flag: com.android.tethering.mainline.beta.tethering_and_p2p_go_local_agent
Test: atest ConnectivityCoverageTests --update-device \
--test-filter '.*Tethering.*'
Test: TH
Bug: 420590461
Fix: 428098654
Fix: 420592689
Change-Id: I7ef79a201116de84f2c4973c4c360fd3d1ef0c4c
Appear to be failing on pixel 7 U (which is 5.10)
Flag: EXEMPT mainline
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I12d70659a994fd2a9f57597fd4aaa1aea6bbe1c7
Maciej Żenczykowskicommited 2025-08-27 13:06:28 -07:00
This reverts commit 9fecf5dee1.
Reason for revert: <Removing alint hook from individual repos as we get ready to roll it out with a global flag>
Bug: 441250579
Change-Id: I12c4c31caa9e8881f4703a1022b607c6744a0c36
Doğancan Emekauthored and Android (Google) Code Reviewcommited 2025-08-27 03:31:04 -07:00
ConnectivityServiceTest can not start QuicConnectionCloser and was
getting the following error.
The interaction between ConnectivityService and QuicConnectionCloser is
already covered by CSDestroySocketTest.
```
08-26 18:53:53.469 6243 11101 E QuicConnectionCloser: [SkDestroyListener] ERROR Failed to create rtnetlink socket: socket failed: EACCES (Permission denied)
08-26 18:53:53.469 6243 11101 E QuicConnectionCloser: android.system.ErrnoException: socket failed: EACCES (Permission denied)
08-26 18:53:53.469 6243 11101 E QuicConnectionCloser: at libcore.io.Linux.socket(Native Method)
08-26 18:53:53.469 6243 11101 E QuicConnectionCloser: at libcore.io.ForwardingOs.socket(ForwardingOs.java:821)
08-26 18:53:53.469 6243 11101 E QuicConnectionCloser: at libcore.io.BlockGuardOs.socket(BlockGuardOs.java:402)
08-26 18:53:53.469 6243 11101 E QuicConnectionCloser: at libcore.io.ForwardingOs.socket(ForwardingOs.java:821)
08-26 18:53:53.469 6243 11101 E QuicConnectionCloser: at android.system.Os.socket(Os.java:834)
08-26 18:53:53.469 6243 11101 E QuicConnectionCloser: at android.net.connectivity.com.android.net.module.util.ip.NetlinkMonitor.createFd(NetlinkMonitor.java:127)
08-26 18:53:53.469 6243 11101 E QuicConnectionCloser: at android.net.connectivity.com.android.net.module.util.FdEventsReader.createAndRegisterFd(FdEventsReader.java:217)
08-26 18:53:53.469 6243 11101 E QuicConnectionCloser: at android.net.connectivity.com.android.net.module.util.FdEventsReader.start(FdEventsReader.java:111)
08-26 18:53:53.469 6243 11101 E QuicConnectionCloser: at android.net.connectivity.com.android.server.connectivity.QuicConnectionCloser$$ExternalSyntheticLambda1.run(D8$$SyntheticClass:0)
08-26 18:53:53.469 6243 11101 E QuicConnectionCloser: at android.os.Handler.handleCallback(Handler.java:959)
08-26 18:53:53.469 6243 11101 E QuicConnectionCloser: at android.os.Handler.dispatchMessage(Handler.java:100)
08-26 18:53:53.469 6243 11101 E QuicConnectionCloser: at android.os.Looper.loopOnce(Looper.java:232)
08-26 18:53:53.469 6243 11101 E QuicConnectionCloser: at android.os.Looper.loop(Looper.java:317)
08-26 18:53:53.469 6243 11101 E QuicConnectionCloser: at android.os.HandlerThread.run(HandlerThread.java:85)
```
Bug: 311792075
Test: atest ConnectivityServiceTest
Flag: EXEMPT test only change
Change-Id: I8ae1033b2ea655ebc26300aac19ec4d8cbdc047d
`base.evaluate()` can be interrupted by other rules in the chain, such
as DevSdkIgnoreRule, if an assumption fails. This prevents
SetFeatureFlagsRule from executing its flag value restoration logic,
leading to an inconsistent state. This change ensures the restoration
logic runs regardless of exceptions.
Flag: EXEMPT mainline
Bug: 440618747
Test: TH
Change-Id: Iba4483b45f11aeed8ae565f8080b2bebd299046c
This renaming is to align the DiscoveryManager design and reflect
its real usage.
Bug: 410734687
Test: atest ConnectivityCoverageTests NsdManagerTest
Flag: EXEMPT rename method only
Change-Id: I0d198aa0752ef51353e4164b612b6ff268ace16a
With this change, the OffloadEngine can receive updates when
offload service information changes from DiscoveryManager. This
allows the OffloadEngine to maintain offload services and to
adjust its behavior accordingly.
Bug: 410734687
Test: atest ConnectivityCoverageTests
Flag: com.android.tethering.mainline.beta.nsd_selective_mdns_response_offload
Change-Id: I6c6ba4e76b4a2a94cbfef37bec9d6f87357bec5f
The old assumption check ran the test on devices with unrestricted
interfaces which were configured in the overlay. Apparently, this is
a common configuration on automotive devices.
There are likely other tests that are broken which need to be moved to
the new assumption check.
Test: TH
Flag: EXEMPT mainline
Change-Id: I504534920ea2c083a05bf217bec17a084a829184
This change specifies that FrameworksNetTests requires a minimum SDK version of 31.
Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ib47c879bc9c15196a7b0dbf5380d73eb94027356
Maciej Żenczykowskicommited 2025-08-26 12:26:45 -07:00
This change sets the minimum SDK version for the FrameworksNetSmokeTests to 31.
Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ib49bca2cf8e04593f2ab5758e7aaf709058029b2
Maciej Żenczykowskicommited 2025-08-26 12:25:02 -07:00
As of M-2025-11 mainline is only being pushed to S+
Test: TreeHugger
Flag: EXEMPT test only
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Id0cf9d2cce27fb90ce076fcdd0f6ee0a95ea9741
Maciej Żenczykowskicommited 2025-08-26 09:56:45 -07:00
Mainline M-2025-11 drops support for android R,
thus making the new minimum Android 12 / S (api 31)
Once we get this to pass tests, we can merge it,
then we need to bump min sdk to 31, then we can
probably get rid of the dlsym stuff and just link it directly.
Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com
Change-Id: I9d68ea9f4aa180b3ec24d252bcd49593e19cf475
Maciej Żenczykowskicommited 2025-08-26 09:56:44 -07:00
This is not safe to do in system server because it affects all
system server callers of NetworkStatsManager, including ones
that frequently call into NetworkStatsService, such as
NetworkPolicyManagerService.
Also, setPollOnOpen is unnecessary because data usage is only collected when processing the `onLost` callback, which is triggered after ConnectivityService forces a poll.
Fix: 427909947
Flag: EXEMPT BUGFIX
Test: covered by existing tests
Change-Id: I2fb25f4529d46dfc14b00b0aa69c5145317ca9dd
Lorenzo Colitticommited 2025-08-26 03:05:26 -07:00
This CL also sorts bpf targets in Android.bp
Test: m
Bug: 440448408
Flag: EXEMPT tcpAccECN is not used
Change-Id: I4a662870333f3da02d4d6cfcb3fca8c0af452d34