This change also removes the MIN_NET_CAPABILITY constant that is not
actually used and can always be re-added in the future (though, I would
imagine that NetworkCapabilities will not be deprecated / removed in
numerical order).
Test: TH
Change-Id: I97ccbc9e915eb74a0ef52c576e16fc8ce8d5b646
Leverage the ConnectivityUtils#isIPv6ULA implementation which is also
accessible for modules, to deduplicate the implementation.
Bug: 183601771
Test: TH
Change-Id: I0943cd76f95e2f54d619015231f68b326194c8b9
ALL_VALID_CAPABILITIES should be a long, since there are now 35 NetworkCapabilities that are stored in a bitfield.
This caused NetworkCapabilities to be lost during parceling.
Bug: 291160389
Test: TH
Change-Id: Ia021ba5fd2094fdaec87446c73de2037c920c4f1
This is a part of preliminary work for sending a v6 NAT-T
keepalive packet in a v6 only network. This commit
release the constraint on constructing a v6 NAT-T keepalive
packet.
Bug: 196453719
Test: Manually connect to v6 only network and check if the
keepalive packets are sent with subsequent commit
Test: atest FrameworksNetTests with the updated test
Change-Id: I9dc96e840265c5dee6b9e3ef2b3901a0aeb4ff9e
This commit
- Set the DF flag on the NAT-T keepalive packet
- Add comment for TTL value
- Do some cleanups
Bug: 196453719
Test: m
Change-Id: I401ae52d8f16e43120210cdea223fd251d53ea3b
This is a preparation change for the subsequent changes to
separate the logic for constructing a v4 NAT-T keepalive
packets to a dedicated method.
Bug: 196453719
Test: atest FrameworksNetTests
Change-Id: If72b4875e65a547bbf90367eacce7b145358006a
Test: new test for this behavior in the preliminary change
Test: FrameworksNetTests NetworkStackTests
Fixes: 138810051
Fixes: 140610528
Change-Id: I95a979d232fb60ece2e33e972bf5d66d20357a1f
There are multiple independent reasons a keepalive can stop. Some
are software (e.g. the app stops the keepalive) and some are hardware
(e.g. the SIM card gets removed). Therefore, there is a very low
probability that both of these happen at the same time, which would
result in the first stop attempt returning SUCCESS and the second
stop attempt returning NO_SUCH_SLOT. Such a race condition can be
ignored with a log, not to crash the system. Change to wtf log so
that the issue could still be visible since this implies possible
bugs in the system.
Also update the javadoc for SocketKeepalive.ERROR_NO_SUCH_SLOT.
Bug: 281484381
Test: atest FrameworksNetTests
Change-Id: I316a2193fc7302b04e074ff0b03dc43946fe5ce6
to make sure a mainline update doesn't break devices in the field
Test: TreeHugger
Bug: 268479036
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Iadcd861509d31b3ed6352d452a159cd89af479dd
Network state is not changed to disconnected when a networkagent
is disconnected and network state is SUSPENDED.
So the function requiresClat return true. Clat is not stoped.
Bug: 277682237
Test: atest FrameworksNetTests
Change-Id: I5edfcf64aca5d2d34325d722dd29fab41bcf2600
P-CSCF list is ordered list. Two lists with same servers but
in different order are not equal. Use proper comparison.
The P-CSCF address is a kind of entry point (proxy) of Server
for IMS transaction between device and IMS Server. It can have
multiple addresses as a list. Even if the same addresses have
different orders, it is assumed that the server order has changed.
Bug: 268479036
Test: TreeHugger
Change-Id: Ia1884f37739a20d871dd0024cc72cb18c083dc8e
The ConnectivityResources class is only usable with QUERY_ALL_PACKAGES
permission, so it is not generally usable in framework-connectivity. It
is also backed by the ServiceConnectivityResources APK, which is
intended as resources for service-connectivity.
Move the class to service-connectivity and update callers. CTS needs a
way to determine the supported keepalive count as it used the
resources from KeepaliveUtils as @hide API, so provide a
ConnectivityManager @hide API for testing.
Bug: 279108992
Test: atest
Change-Id: I3c9a77c580b5ab87c922c32778bce15dc33b4d1d
Add getTransportTypesInternal as a hidden api for internal callers. This
will be used for any metrics that need to store the transport types of a
network.
Bug: 273451360
Test: atest FrameworksNetTests
Change-Id: I527638e5408e7971a450135345e7e51b6125d665
* changes:
EthernetManagerTest: update tests that bring up tap without carrier
TestNetworkService: use IFF_NO_CARRIER to bring up iface without carrier
aosp/2384137 added cronet to framework-tethering.
But framework-connectivity is a better place to put cronet since
cronet does not work on R devices (b/270049141) and
framework-tethering is R+, framework-connectivity is S+.
Followup CLs will move some modules (e.g. CronetJavaPrejarjarDefaults)
that use the branch dependent soong variables to framework/Android.bp
Test: TH
Bug: 278070640
Change-Id: I6bc10116759fb9e083c02147908e53022dab740a
Note: this switches
com_android_networkstack_tethering_util_setupIcmpFilter
over to relative cbpf which in turn is called from:
com_android_networkstack_tethering_util_setupNaSocket
com_android_networkstack_tethering_util_setupNsSocket
and tested by p/m/C's:
TetheringUtilsTest.java - testIcmpSocketFilters()
Test: TreeHugger, atest TetheringUtilsTest
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I22a5ea8f8e3b879a37fe4acd84f61020661eaa71