Allow DO apps to call startTethering and stopTethering for wifi
tethering with a non-null SoftApConfiguration.
Bug: 295979433
Test: atest TetheringTests CtsTetheringTests
Change-Id: Ie5836e9e30afb2df1de0640645d696e185aa2191
Quang Anh Luongauthored and Quang Luongcommited 2025-03-19 03:30:48 -07:00
One ALOG to record whether the map is created by btf or not.
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I5da3af67ba28b01ee4e7b08e61f1fedc24e2840f
Maciej Żenczykowskicommited 2025-03-18 23:01:20 -07:00
This change is a no-op which only fix lint errors.
This is necessary to make the subsequent changes easier to review.
Test: TH
Bug: 349487600
Change-Id: Ief867009db6aaabd9d0759048cdd7c3318991b02
* changes:
Enable BTF for maps loaded by NetBpfLoad
Add method to get key value type ids
Add method to load btf into kernel
Add method to update btf_var_secinfo.offset
Add method to update btf_type.size for BTF_KIND_DATASEC
Maciej Żenczykowskiauthored and Gerrit Code Reviewcommited 2025-03-18 17:04:56 -07:00
BPF_ANNOTATE_KV_PAIR is used to tell the bpf loader about the btf
key_type and value_type of a bpf map.
This CL adds a method to get key value type ids from
BPF_ANNOTATE_KV_PAIR
Bug: 403381101
Test: boot
Change-Id: If308d49b64b38f65991a0a8177e5072d54e2cdf6
Motomu Utsumiauthored and Maciej Żenczykowskicommited 2025-03-18 12:15:39 -07:00
size in btf_type of BTF_KIND_DATASEC is 0 at compilation time.
So bpf loader needs to update to actual size based on ELF's section
size.
Bug: 403381101
Test: boot
Change-Id: I78fb26a5b8eeb120044b5737667f472fac51d79f
Motomu Utsumiauthored and Maciej Żenczykowskicommited 2025-03-18 11:46:16 -07:00
As ConnectivityService is ready to accept messages about a network
agent, it should process messages immediately and before messages
from other agents are processed.
This is because of minute ordering issues between the agent process,
ConnectivityService and the network stack. In particular, as the agent
is created, ConnectivityService requests the NetworkMonitor from the
network stack ; while this is happening, the process creating the
agent may have sent a bunch of other messages... including, but not
limited to, disconnects or creation of other agents.
The operative case is the case where a disconnect is in the queue.
agent1.register
→ CS creates the monitor for agent 1
agent1.unregisterAfterReplacement
→ CS enqueues in agent1 pending creation of the monitor
agent2.register
→ CS creates the monitor for agent 2
monitor for agent 1 is created
→ CS posts a message to complete agent 1 creation
monitor for agent 2 is created
→ CS posts a message to complete agent 2 creation
agent 1 creation completes
→ CS re-posts the unregisterAfterReplacement message
agent 2 creation completes
...and this is where things fail, because unregistering agent 1
isn't processed yet. If they use the same interface (which is
a common use case for unregisterAfterReplacement) then this
creation will fail.
To address this, this patch will process all agent1 messages
synchronously as the creation completes. It will solve the case
above, and it passes all tests for early network creation.
However, it is worth noting that this is not actually correct,
because it does not guarantee that all messages are processed
in order. Namely, two agents have separate queues and
therefore if they send interleaved messages while CS is
waiting for the NetworkMonitor to be created, the order of
these messages will be lost. e.g.
agent1.register
agent2.register
agent1.unregisterAfterReplacement
The case above SHOULD fail if the agents have the same
interface, but with this patch it will likely succeed because
the call to agent1.unregisterAfterReplacement will be received
while the two NetworkMonitor are being created, and then
be processed as agent1 finishes registration.
The correct change, therefore, would really enqueue all
messages when *any* agent (of the same process at least)
is being created. However, it is arguable whether it's worth
building that change over this one, and it is even arguable
whether the behavior of this here change might not be
better, insofar as two agent messages are generally
unrelated to each other except for unregistering.
Test: CtsNetTestCases ConnectivityCoverageTests
Change-Id: Idf75e4e96c67a456cf0979a79321603b46e8c99c
Now that the system server has a queue doing this job,
the queue on the network agent side can be removed.
Test: ConnectivityCoverageTests, CtsNetTestCases
Change-Id: Idf0435f447cfdd28d829a867d1085771837c6f9b
* changes:
Reapply "Add a queue system server-side for NetworkAgent"
Reapply "Unify registration and NM assignment in NAI"
Reapply "Return the registry in registerNetworkAgent."
Jean Chalardauthored and Gerrit Code Reviewcommited 2025-03-18 03:19:07 -07:00
but only enable it in enforcing mode on aarch64,
since that gets good test coverage via Pixel
on GoogleGuest ipv6-only wifi network
and (for example) T-Mobile US cellular.
For other architectures this will only result
in (automatically ratelimitted to at most 5/s)
audit logs for any 'unusual' system calls.
Test: TreeHugger, manually on Pixel on GoogleGuest wifi
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Id14c6d9db8d7b4652c7358cac101a82ef09843e0
Maciej Żenczykowskicommited 2025-03-18 02:57:06 -07:00
This commit updates ApfIntegrationTest to reflect the latest
requirements for supporting APFv6 and APFv6.1, including their
respective memory requirements.
Test: TH
Change-Id: I29e8e692eaf8e378fea99bda36c752d9d729ed86
Device Owner and Carrier-privileged tethering usage relies on starting
tethering without TETHER_PRIVILEGE permission. Add utilities to
CtsTetheringUtils to do this.
Bug: 295979433
Test: atest DeviceOwnerTest TetheringManagerTest
Change-Id: Id3eba71481e27ccfa32f2b0588b8a74c490c5311
Quang Anh Luongcommited 2025-03-18 16:24:39 +09:00
This change corrects a missing function error, which was renamed in aosp/3545962.
Test: atest NetworkStaticLibHostPythonTests
Change-Id: I2f51702adfa48f2207ef4dd79f641c8f57d15ac7
Separate 'running' flag out into 'running' and 'sigterm',
and make SIGTERM handler the only thing that sets 'sigterm'.
running is cleared via catastrophic errors, ie. EOF and ENETDOWN
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I8254c3f4643d60feff1cb32aaa9784dca18e138c
Maciej Żenczykowskicommited 2025-03-17 22:53:32 -07:00
Now that faulty Telephony tests have been disabled temporarily
to allow for this bugfix, this can be reverted.
This reverts commit a5ec9b4112.
Test: FrameworksTelephonyTests CtsNetTestCases
Change-Id: I71abf9d02bdd34a4de80157a3f42bdfee6f6617e
Now that faulty Telephony tests have been disabled temporarily
to allow for this bugfix, this can be reverted.
This reverts commit 30fcf820f9.
Test: FrameworksTelephonyTests CtsNetTestCases
Change-Id: I57f25f5e6481106255df0ab69558e351eb938f68