EthernetTetheringTest#testTetherZeroLengthDhcpPacket requires the latest
NetworkStack module, otherwise, the test will fail due to the loss of
the fix. Apply @NetworkStackModuleTest to exclude this testcase from
target test suite CtsTetheringTestLatestSdk.
Bug: 283200648
Test: atest CtsTetheringTestLatestSdk
Change-Id: Iebfb043e2b71427a6feaf90788fe79b6ab6b678d
It leads to complexity when Tethering is overridden, because the
required attribute must be duplicated for all the variants.
Require NetworkStack be explicitly installed instead.
Bug: 242509786
Test: m
Change-Id: Ideaecf88418901e2c86271166be24f6b7e498a20
Use type + scope as key to build cached address map so that
SAP (key: TETHERING_WIFI + INTERNET) and LOHS
(key: TETHERING_WIFI + LOCAL) can use different address.
Bug: 233175023
Test: atest TetheringTests
Change-Id: I46a4b3ee919628092b7540202a43d79f407b09b6
This change store localOnly wifi clients in its own field so that
tethered and localOnly hotspot clients can exist at the same time.
Currently, there are no tethered and localOnly hotspot clients at
the same time because PrivateAddressCoordinator does not support
SAP + LOHS. A follow-up change will be made to allow this.
When both SAP and LOHS are enabled, the SAP and LOHS clients from
TetheringEventCallback#onClientsChanged are all TETHERING_WIFI.
Currently, there is no way for the listeners to distinguish between
SAP and LOHS clients.
Bug: 233175023
Test: atest TetheringTests
Change-Id: I01b0a6abb084f7135f7825e0c5303e49c16a4c39
As the suggestion from:
https://android-review.git.corp.google.com/c/platform/packages/modules/Connectivity/+/2489359/9/Tethering/src/android/net/ip/IpServer.java#b1176
Make BaseServingState an abstract class to prevent it from being used
directly. Additionally, move the handleNewPrefixRequest method into
BaseServingState because it is the only class that uses it.
To avoid TetheredState and LocalHotspotState from having to implement
their own enter function, add the mDesiredInterfaceState field to
BaseServingState.
Bug: 233175023
Test: atest TetheringTests
Change-Id: I03269c37e666345efb0c61039a2bb213f223a5a2
Starting with U, only explicit intents will be allowed to
launch non-exported internal components. Set package name
to entitlement recheck intent so that the intent could be
delivered to tethering itself successfully.
Bug: 278482046
Test: atest TetheringTests
manual verify entitlement recheck work in U
Change-Id: Ife30eee13fe39509ccb5786d2a76fbb7baa022a8
The logic dealing with in vs out-of-process tethering flags
was added in aosp/master once it was already not merging to tm-dev,
thus ending up only in udc-dev, it was later removed in aosp/master,
and then cherrypicked to udc-dev.
As such there is no shipping version of the bpfloader
(besides early U developer previews and betas)
with this requirement.
This will make September+ releases of the tethering apex incompatible
with U developer previews and betas 1 and 2.
(ie. any U build not including https://googleplex-android-review.git.corp.google.com/c/platform/system/bpf/+/23214402
which was merged into udc-dev on May 14th @ 18:00)
This change has a dependency on
https://googleplex-android-review.git.corp.google.com/c/platform/vendor/google/modules/TetheringGoogle/+/23243439
Test: TreeHugger
Bug: 279942846
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I52d0ea706a8e2cb5c37874ed54f199035c14966c
DHCP packet listener doesn't close socket any more upon receiving a
zero-length DHCP packet with a fix, instead, just ignore the zero-length
packet and continue reading. Also update the integration test logic to
verify the new behavior, i.e. we can send DHCPDISCOVER from a second device
with different mac address to verify the upstream DHCP server doesn't close
the listening socket, and then we will receive the response from server e.g.
DHCPOFFER packet.
Bug: 269692093
Test: atest TetheringIntegrationTests
Change-Id: I183da43ce5a6511714d293318fe6c60ea55999c0
With the release cut of the July train and the recent automerger
cutover, tm-mainline-prod is now officially an abandoned branch.
This change deletes (most) infrastructure that was put in place to
disable cronet on tm-mainline-prod.
Test: builds
Change-Id: I078f2114b736a634f08d8f704c19beb2224ef645
This change centralized some common test codes to
verifyHotspotClientUpdate() to facilitate the following
commit for softap+lohs
Bug: 233175023
Test: atest TetheringTests
Change-Id: Iee3905084b244b91abdf7c562d77b5054d58ff6a
ConntrackSocketTest#testIpv4ConntrackSocket always fail in cuttlefish
because it gets NullPointerException when accessing tupleOrig in
ConntrackMessage. tupleOrig can be null if it doesn't have source IP.
This situation happens when dumping the following conntrack entry:
vsoc_x86_64:/ # cat /proc/net/nf_conntrack
ipv4 2 unknown 2 570 src=0.0.0.0 dst=224.0.0.22 [UNREPLIED] \
src=224.0.0.22 dst=0.0.0.0 mark=0 secctx=u:object_r:unlabeled:s0 use=2
Bug: 280203901
Test: atest TetheringPrivilegedTests (on cuttlefish)
Change-Id: Iddc8cb390a4369190d535f4694e0e5fa4b6e590f
It is just a constant source of bugs, with no real tests,
let's stop pretending this is a supported configuration.
The only tested configuration is out-of-process tethering
updatable apex.
Test: TreeHugger
Bug: 279942846
Change-Id: I4b659a3cd32b89a65549b56006b926a5ac755f7b
Address a TODO in TetheringConfiguration to use a dependency object
instead of static mocking on DeviceConfig.
This avoids TetheringConfiguration dependencies on internal
implementation of DeviceConfigUtils, unblocking changes in
DeviceConfigUtils.
Bug: 279108992
Test: atest TetheringTests
Change-Id: I252eaadff85fa47b894e989b4f2527b00c5dca56
DHCP packet listener closes the listening socket and stops reading
packet upon receiving a zero-length DHCP packet, which will break
the following DHCP handshake. Add an integration test to verify the
current behavior. A follow-up fix will verify if DHCP server will
accept the zero-length DHCP packet and continue reading packet on
that socket.
Bug: 269692093
Test: atest TetheringIntegrationTests
Change-Id: I5990e37cdfad4e8e4337b0bb1a74632286884baf
This commit adds two new fields, tx_bytes and rx_bytes, to the
UpstreamEvent message. These fields provide information about the
amount of data transferred during the event, which can be useful for
network performance analysis. The current tx/rx usages are always
zero, but it will be updated in a later change to reflect the actual
usage. No changes were made to the existing fields upstream_type and
duration_millis.
Test: atest TetheringMetricsTest
Change-Id: I9e1043b3fff5aa3f548b8696bac7e5bc4271c77c
The information can be useful for issue debugging, it shows the
accumulated traffic offloaded to the hardware for all upstreams.
$ dumpsys tethering
....
ForwardedStats:
rmnet_data2: rx:155686981 tx:799922
....
Bug: b/205762647
Test: adb shell dumpsys tethering
Change-Id: I94143329bdc8ad0eff79c32f329fae95ad3acf8a
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
System libraries and binaries (e.g. netd) have a dependency on this.
Adding it to the sdk module allows an external snapshotting script
to generate prebuilts stubs of this library and commit them to
prebuilts/module_sdk. This allows minimal branch setup to build against
the apis of libnetd_updatable without checking out its source code.
Bug: 273723791
Test: m tethering-module-sdk
Change-Id: I1f235d86abba2c37ca7d750dea7071227e1346fe
This reverts commit 5f44ed3e7e.
Reason for revert: The symbol not found error was a transient build failure.
Change-Id: Iada1a0bc9c2282286c1e3b972de42e6387c901d6
Other virtual interface ethernet test cases stop ethernet tethering
by deleting the virtual interface. To disable ethernet tethering for
testPhysicalEthernet, call stopTethering explicitly.
Bug: 271380398
Test: atest EtherentTetheringTest
Change-Id: I19a73f63227bab6a60d57d38b17a20a3f3f6c1d4
Instead of NetworkStackApiStableShims, use NetworkStackApiCurrentShims
as this is a development branch.
Use java_defaults in the "merge conflicts expected" section, so that
module release branches can use the same defaults, but set it to
NetworkStackApiStableShims.
The shims are removed from FrameworksNetIntegrationTests, as they are
already available there through service-connectivity-pre-jarjar. Keeping
them as a dependency would make FrameworksNetIntegrationTests use both
Stable shims (directly) and Current shims
(through service-connectivity-pre-jarjar).
Bug: 266205506
Test: m
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:921290b49d109360aae5dc39effaa3b0e691f65a)
Merged-In: I88228152834a1c06830fb51e868fb8e3d8c47519
Change-Id: I88228152834a1c06830fb51e868fb8e3d8c47519
The TODO is used to track to dynamically pass down the TTL from the
upstream interface. Remove it as it was already done in IpServer.
Test: No code changes
Change-Id: Idb12f82023315661f1bf4c767b9b7744a151e821
This fails to build on git_master when
depending on `sdk_version:module-current` and
`libs:["framework-tethering-pre-jarjar"].
AIUI, some builds use sdk prebuilts that have compiled out
some of the hidden apis. And thus fails with symbol not found.
So we depend on the impl version of frame-tethering so we always
have access to these hidden apis for MTS.
Test: atestNetHttpCoverageTests
Change-Id: Id68a9051b9f8566f9ca42142669150a6db8b0925
Revert submission 2502135-remove_soong_namespace
Reason for revert: Missing line needs to be added
Reverted changes: /q/submissionid:2502135-remove_soong_namespace
Change-Id: I780a21cf7031e04eb368fda4f93ed16ea032ca8d