History log of /frameworks/base/services/net/java/android/net/apf/ApfGenerator.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
3cc40ea6c50c976dd4e6485574a8be899867f610 23-Apr-2018 Bernie Innocenti <codewiz@google.com> apf: Add counters for dropped / passed packets

ApfFilter maintains separate counters for each reason why a packet was
passed or dropped by the filter logic.

There's also a total which should match the individual counters,
*unless* the APF interpreter aborted execution early due to an illegal
instruction or an out-of-bounds access.

Test: both on APFv2 and APFv4-capable device:
runtest -x tests/net/java/android/net/ip/IpClientTest.java
runtest -x tests/net/java/android/net/apf/ApfTest.java
manual tests connected to an AP
Bug: 73804303
Change-Id: I54b17fcbb95dfaea5db975d282314ce73d79d6ec
/frameworks/base/services/net/java/android/net/apf/ApfGenerator.java
deb145d2334635dc15781415603ff3a8559e7c49 16-Apr-2018 Bernie Innocenti <codewiz@google.com> Adjust APF interpreter tests to match APFv4

Change-Id: I4311c754f1cb79633d49c5c1c0b4e27c8dde727e
Bug: 73804303
Test: runtest -x tests/net/java/android/net/apf/ApfTest.java
(cherry picked from commit 545d9367e24d1d55b2539c02273f92c61da74af0)
/frameworks/base/services/net/java/android/net/apf/ApfGenerator.java
408dbda4c1fbee064c7878ef5cfb000e58027a5f 22-Mar-2018 Bernie Innocenti <codewiz@google.com> Teach ApfGenerator about the new opcodes for accessing data memory

Bug: 73804303
Bug: 36221302
Test: runtest -x tests/net/java/android/net/apf/ApfTest.java
Change-Id: Iaf92ca0bbebaaf66d0f2f7adc1a9014607f3ecf6
(cherry picked from commit a9949e9e2599c5f97bf83c12c8f4fa66be9dd294)
/frameworks/base/services/net/java/android/net/apf/ApfGenerator.java
0bc4709add7ae23a859abfb165a4323fe93ef1fd 30-Mar-2018 Bernie Innocenti <codewiz@google.com> Relax APF version check in ApfGenerator

Instead of requiring an *exact* version, we now require a minimum
version. This is necessary if we wish to upgrade the APF interpreter in
vendor firmware independently of the framework code. Adding new opcodes
without changing the semantics of the old ones is always possible and
usually easy, so we can at least have a backwards-compatibility horizon
wider than a single version.

Bug: 36221302
Bug: 73804303
Change-Id: I4f1ed661afb2ede193188eb8086fbf2a8b45b33d
Test: Change extracted from aosp/647079 and tested there
(cherry picked from commit d6bf7ffea788f5753be48a487a2a3b34951dfcb8)
/frameworks/base/services/net/java/android/net/apf/ApfGenerator.java
91723d7f7ecc07e9bfa84c445213acf1dec0664f 14-Apr-2016 Paul Jensen <pauljensen@google.com> Avoid APF JNEBS instruction with R1 as it doesn't work

APF version 2 and prior versions fail to execute JNEBS with R1 argument.
The APF interpreter tries to use R1's value as the number of bytes to
compare, as well as the offset within the packet to compare at.
This change makes ApfFilter avoid using this and makes the APF generator
throw if this is used. This was limiting the IPv4 filter, causing it to
only drop multicast (when multicast filtering was enabled), rather than
a wider range of broadcast packets.

Bug: 28206777

Change-Id: I8d116e024e8bd641b21053c6b1defc734d744467
/frameworks/base/services/net/java/android/net/apf/ApfGenerator.java
d38fb7662d0e525eee57062ee8c14f661b1aee2d 08-Jan-2016 Paul Jensen <pauljensen@google.com> Android packet filtering program interpreter test & program generator

Change-Id: I17951bd6320b9eb3b6c43f2ae37f62c2025705c1
/frameworks/base/services/net/java/android/net/apf/ApfGenerator.java