Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 035dbd43 authored by Bernie Innocenti's avatar Bernie Innocenti
Browse files

apf: adjust JNI to accept_packet()'s new signature

Bug: 73804303
Test: runtest -x tests/net/java/android/net/apf/ApfTest.java
Merged-Id: I0a3ad562496f3e06bc9527af4e038be3cdfe25c6
Merged-Id: I1674ac22f00af037ad415a4436b94b2eec6a02b7
Merged-Id: I966776e6574cbf167a6148e20d40e2bdcc887327
Change-Id: Id5c3cec5459ce6f9693457448002e60bbca6c09b
(cherry picked from commit 64bc32c5)
parent 85e4a977
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -34,6 +34,8 @@ static jint com_android_server_ApfTest_apfSimulate(
            env->GetArrayLength(program),
            (uint8_t*)env->GetByteArrayElements(packet, NULL),
            env->GetArrayLength(packet),
            nullptr,
            0,
            filter_age);
}

@@ -143,7 +145,8 @@ static jboolean com_android_server_ApfTest_compareBpfApf(JNIEnv* env, jclass, js
        do {
            apf_packet = pcap_next(apf_pcap.get(), &apf_header);
        } while (apf_packet != NULL && !accept_packet(
                apf_program, apf_program_len, apf_packet, apf_header.len, 0));
                apf_program, apf_program_len, apf_packet, apf_header.len,
                nullptr, 0, 0));

        // Make sure both filters matched the same packet.
        if (apf_packet == NULL && bpf_packet == NULL)