If tethering's upstream have ipv6, the #initTetheringTester
would make sure ipv6 tethering connectivity is ready for testing.
Test: atest EthernentTetheringTest
Change-Id: Iade99eeb95fa94483248799eb852a81662bbb1e0
isExpectedUdpPacket and isIcmpv6Type is similar util, put them in the
same place and have isExpectedIpPacket to share the ip/eth parsing code.
Test: atest EthernetTetheringTest
Change-Id: I3ede46f5ff1799f575fad7aca277f2bc0bf6c391
This is no-op change. Originally RemoteResponder design for providing a
base responder that user could extend it like DnsServerResponder,
TcpResponder, UdpResponder. But actually user could just simply extend
TetheringTester that make RemoteResponder useless. Thus, remove it to
simply the code.
Test: atest EthernetTetheringTest
Change-Id: I47b22a1460ca312c678778143033aadf5e3e0b82
Note: to avoid missing some dependeices change only happen in T+, below
testing verification is perform by internal branch.
Test: atest TetheringTests
atest TetheringIntegrationTests
atest CtsTetheringTest
atest MtsTetheringLatestSdk
manually change entitlement check recheck period to 1 min and
monitor schedule alarm works.
Dogfood this change personally 7 days, major use hotspot sharing network to notebook to work.
Bug: 232193147
Change-Id: I3cba98f42ac1a9c0c1db4b2ad036aff714a428f3
Use three-part kernel version numbers to check which device
needs to verify BPF offload. Only check major and minor number
is not enough. Ex: mixed build T + R may have an unsupported kernel
version 4.19.160 (require 4.19.176+). Now check the subminor
number as well.
For UDPv4 support, kernel require 4.14.222+ 4.19.176+ 5.4.98+, 5.8.0+
Test: atest EthernetTetheringTest (raven @ internal master build)
Test: cts test (bramble @ T + R mixed build)
> run cts-on-gsi -m CtsTetheringTest -t android.net.EthernetTetheringTest#testTetherUdpV4AfterR
Bug: 232332847
Change-Id: I466df73b0fa35b086a2c5e11f8624c84eb79c8fd
testUpdateConnectedClientsForLocalOnlyHotspot should not run before T,
but it don't be ignored correctly because missing DevSdkIgnoreRule
setup.
Bug: 233077722
Test: TH
Change-Id: Ib2d241f927ccdc5d2bc392962481ecb86a223e09
This is a preparing change.
1) In enableWifiIpServing, replace
ensureIpServerStarted(ifname) +
changeInterfaceState(ifname, ipServingMode)
with enableIpServing(TETHERING_WIFI, ifname, ipServingMode).
And checking whether corresponding wifi or p2p feature is
avaialble before enableWifiIpServing. Note: If the wifi or p2p
feature wasn't supported before, it would still call
changeInterfaceState without ipServer created but
changeInterfaceState would be no-op because there is no
corresponding ipServer for changing state.
2) Splitting enableWifiIpServing into enableWifiIpServing and
enableWifiP2pIpServing.
3) No longer guess the interface name after T. WIFI_AP_STATE_CHANGED
intent should always include ifname and it should be tracked by
mTetherStates. If OEM have modification in wifi framework to send
empty ifname, tethering no longer support this after T.
4) After T, tethering always trust the ifname which pass by wifi or p2p
intent broadcast and treat it as TETHERING_WIFI or
TETHERING_WIFI_P2P. This allow tethering to deprecate wifi/p2p regexs
after T.
Bug: 189410000
Bug: 178116595
Bug: 185451791
Bug: 190145323
Bug: 176048959
Test: atest TetheringTests
Change-Id: Ia5f69ddf2d842536ce0df75eeae57866f56df571
Before T, wifi local only mode won't update onConnectedClientsChanged.
To support updating tethered client information for localOnly hotspot,
register localOnly softap callback to get connected wifi client update.
Bug: 171928468
Test: atest TetheringTests
Change-Id: I0e974feea9497809ea02a4138c7b9c2c584a8a45
to account for close() becoming a no-op
Bug: 230880517
Test: TreeHugger, atest com.android.networkstack.tethering.BpfMapTest
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I69f25ff168c1cf0f13434dd1d842ed81a6a03f2f
Fill in downstream type, upstream type, error code and user type to NetworkTetheringReported.
Bug: 153942334
Test: m, flash and boot
Test: atest TetheringMetricsTest
Change-Id: I6ba7d9e512b1ada519f44f9f3a95667e4b0f03c0
Kernel version which is older than 4.14 doesn't support UDP offload
absolutely. Kernel version which is between 4.14 and 5.8 support UDP
offload probably. Simply set kernel 4.14 to be threshold first and
monitor on what devices tests fail for improving the offload support
checking.
Also fix a minor bug which UDP tethering without offload is not tested
on R.
Bug: 230359047
Test: atest EthernetTetheringTest
Change-Id: Ieb181d1b5ed67b922e18ce77a9c96208b2984d10
Make that tethering dumpsys can choose which map to dump.
The related functions in BpfCoordinator and its test are refactored
into template functions. This is used in the following commits which
will dump stats map for testing.
Bug: 227159997
Test: atest TetheringCoverageTests
Change-Id: I23d747543d16a971773c132b60227eb3f42efe25