summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-12-03Make the Q dnsresolver tests pass on 2020-01 or later modules. am: ↵android-10.0.0_r41android-10.0.0_r40android-10.0.0_r39android-10.0.0_r38android-10.0.0_r37android10-qpr3-s1-releaseandroid10-qpr3-releaseAutomerger Merge Worker
3f47223fe9 am: 3eafc6a87b Change-Id: I384d512892163c3010b3b3ea2a8b737f5971462d
2019-12-03Disable Asan on resolv_integration_test am: ceedbfd1bb am: 35d42d69f8Automerger Merge Worker
Change-Id: Ibbc1b041d9229829dd23fd6a39acc07833f0f1c1
2019-12-03Make the Q dnsresolver tests pass on 2020-01 or later modules. am: 3f47223fe9Automerger Merge Worker
Change-Id: I983af620e4ae345804912eaa1f33d906ae539423
2019-12-03Disable Asan on resolv_integration_test am: ceedbfd1bbAutomerger Merge Worker
Change-Id: Ic4082464941ec99998c5afcdee00c85372b8bd77
2019-11-26Make the Q dnsresolver tests pass on 2020-01 or later modules.Lorenzo Colitti
These tests do not pass because the module removed support for TLS fingerprints, instead using its own CA cert. The fingerprints were only ever used for testing, so removing the functionality doesn't cause problems at runtime, but it does does break the tests in qt-dev. It is not practical to backport to qt-dev the change that removes support for fingerprints. So just skip the tests on qt-dev for now. Bug: 144850003 Test: cd system/netd/resolv; atest Change-Id: Ic3decb762d7beb4860dd0634da2309430dd150cd Merged-In: Id0584aea3a3472ef1008cc6ae3acb1fbce7d5ca3 Merged-In: Ic4af1258b6c6072cdbd00d3ea2ce71bdca27861a
2019-11-26Disable Asan on resolv_integration_testKen Chen
Disable address sanitizer on resolv_integration_test to avoid false positive. Test: atest resolv_integration_test Bug: 144460245 Change-Id: I154bdab70ce6858b0e2805dba44c3f8c16a7074b Merged-In: Id0584aea3a3472ef1008cc6ae3acb1fbce7d5ca3 Merged-In: I154bdab70ce6858b0e2805dba44c3f8c16a7074b
2019-11-15dlopen() returns error via dlerror() not errnoMaciej enczykowski
See 'man 3 dlopen' Test: builds Bug: 144465080 Signed-off-by: Maciej Żenczykowski <maze@google.com> Change-Id: I841919783395e0bb38b8c3247056a23ff0adc0bc Merged-In: I841919783395e0bb38b8c3247056a23ff0adc0bc
2019-11-07Merge "DO NOT MERGE ANYWHERE Set module versions to 299900000 Dev branch ↵Akshay Thakker
modules need to have a super high version code so that they can be sideloaded on any device running any version of modules." into qt-qpr1-dev
2019-10-31netd ebpf: always match and thus allow incoming udp to unconnected socketsMaciej enczykowski
This also allows other edge case packets where we cannot figure out the socket which will receive the packet. This may be because: - the target socket is an unconnected udp socket not found by early demux - such a socket doesn't exist: we'll likely send an icmp error or tcp reset, this should be rare and thus shouldn't affect bandwidth nor power (and since we just received the packet the relevant radio should already be awake anyway) - the socket is in some other weird partial state, ie. possibly tcp syncookies, or tcp reqsk, or tcp timewait sockets... etc... While we're at it also change: return masked_value; to return masked_value ? BPF_MATCH : BPF_NOMATCH; in two spots. Test: build + cuttlefish atests, manual testing with previously problematic game Bug: 140972725 Signed-off-by: Maciej Żenczykowski <maze@google.com> Change-Id: I17c02d5bf06189e226db9c0edc8da0e013d1eb05 Merged-In: I17c02d5bf06189e226db9c0edc8da0e013d1eb05
2019-10-28DO NOT MERGE ANYWHERE Set module versions to 299900000Akshay
Dev branch modules need to have a super high version code so that they can be sideloaded on any device running any version of modules. Bug:143377911 Change-Id: I9c0cec312848925511829e2ab48d7f2493d8996f
2019-09-22[automerger skipped] dns_tls_frontend.cpp: set queries_ to 0 in startServer ↵Yongqin Liu
am: 589bd52d90 am: 9396e88bdb -s ours am: ef174ce63a -s ours am: f06a46d409 -s ours am skip reason: change_id I9ce9314c34420b346703500f4120304dfa58b9af with SHA1 7184fb338c is in history Change-Id: I47bc5f8c4fdab6a8ce088689dc7f3688a5954dca
2019-09-22[automerger skipped] dns_tls_frontend.cpp: set queries_ to 0 in startServer ↵Yongqin Liu
am: 589bd52d90 am: 9396e88bdb -s ours am: ef174ce63a -s ours am skip reason: change_id I9ce9314c34420b346703500f4120304dfa58b9af with SHA1 7184fb338c is in history Change-Id: I08f1c549cd737573270e5d397938599303e85309
2019-09-22[automerger skipped] dns_tls_frontend.cpp: set queries_ to 0 in startServer ↵Yongqin Liu
am: 589bd52d90 am: 9396e88bdb -s ours am skip reason: change_id I9ce9314c34420b346703500f4120304dfa58b9af with SHA1 7184fb338c is in history Change-Id: I1cc9bca90c0bac4de045f3a26c93e68efc6eece2
2019-09-22dns_tls_frontend.cpp: set queries_ to 0 in startServerYongqin Liu
am: 589bd52d90 Change-Id: Ic533249c753fc26020d260ef3f679d3ab7860755
2019-09-11dns_tls_frontend.cpp: set queries_ to 0 in startServerpie-vts-devYongqin Liu
so that we could call waitForQueries with 1 passed to check with the query number. In TlsBypass test in tests/netd_test.cpp file, 1 is passed to tls.waitForQueries to check with query number, but after one tls enabled config, the query number will be more than 1, which makes the check in DnsTlsFrontend::waitForQueries following has no meaning: https://android.googlesource.com/platform/system/netd.git/+/master/tests/dns_responder/dns_tls_frontend.cpp#382 To make the test cleanest, we set queries_ to 0 in the startServer function of dns_tls_frontend.cpp, so that in the TlsBypass test of tests/netd_test.cpp, we only need to wait for the validation query come simply with calling of tls.waitForQueries(1, 5000), since the tls.startServer is called every time in the for loop when tls enabled, so the call to waitForQueries when tls enabled works there Test: adb shell /data/nativetest64/netd_integration_test/netd_integration_test64 --gtest_filter=ResolverTest.TlsBypass on hikey Test: ./android-vts/tools/vts-tradefed run vts-kernel -m VtsKernelNetdTest -t VtsKernelNetdTest.ResolverTest.TlsBypass on hikey Change-Id: I9ce9314c34420b346703500f4120304dfa58b9af Merged-In: I9ce9314c34420b346703500f4120304dfa58b9af Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
2019-07-25Restore the PrivateDnsMode emun to its original definitionlifr
am: 72e88a79af Change-Id: I6b455a2f3a0197214573f2341707ae9d8068f37e
2019-07-25Subsampling DNS events to reduce logsLuke Huang
am: 57b128d35e Change-Id: Ie166c5c646e23ea8de7652fb69a79206d99034cc
2019-07-25Add one field (sampling_rate_denom) in NetworkDnsEventReportedlifr
am: 9768ae29d1 Change-Id: Id90dfa771c0636f1ec28431430e313dcdf94e229
2019-07-25Fill in each dns stats value in message NetworkDnsEventReportedFrank Li
am: 08ce7b885c Change-Id: I649466e827c9891c41024ee38a3af33de8ec050b
2019-07-25Add NS_R_INTERNAL_ERROR item into NsRcode in stats.protoFrank Li
am: 442484b9ab Change-Id: I3202580e30232dfa54d94efd35e4c68664f1c6fa
2019-07-25Sync the proto stats.proto from dns_resolver.proto (Need to match as ↵Frank Li
aosp/968223) am: 4fadb4451d Change-Id: If5a004c6a18a265f5f0d73e9615a8ff0806adf43
2019-07-26Restore the PrivateDnsMode emun to its original definitionlifr
Westworld requires the first field of all enums to be set to UNKNOWN/UNSET, but this is awkward for the resolver code and makes it hard to verify whether we have any PrivateDnsMode variables initialized to UNKNOWN by accident. So revert this change, and add a simple function to convert the internal PrivateDnsMode enum to the other PrivateDnsMode emun defined in the stats proto. Bug: 119862317 Test: atest Change-Id: Id146a16e41e0183867b3a4e2d87a2b0fc09df27d
2019-07-26Subsampling DNS events to reduce logsLuke Huang
Currently, each device generates about 4000 queries per day. Reduce the number of events by subsampling events based on how interesting they are: - if return_code == 0 -> log 1 in 100 events (random sampling) - if return_code == EAI_NODATA -> log 1 in 10 events (random sampling) - else -> log 100% Also allow to use experiment flag to update sub-sampling denom. Example for dumpsys dnsresolver: NetId: 100 DnsEvent subsampling map: default:1 0:100 7:10 Bug: 119862317 Test: manual test with using setprop to change subsampling map atest Merged-In: Ibbe3c653bdf45fc03b56a61e3401fad11c05a010 (cherry picked from commit 79e5185780a94db0b2356edf987239da459433f4) Change-Id: I170dda9247e94a17a7cac9e7e414d592bb4dccbf
2019-07-26Add one field (sampling_rate_denom) in NetworkDnsEventReportedlifr
The sample rate of DNS stats(to statsd) is 1/sampling_rate_denom. Bug: 119862317 Test: ./out/host/linux-x86/bin/statsd_testdrive 116 Merged-In: Ifd496f01ceaeb48de0361280c2315c3733c24f66 Merged-In: If142d8a764437e6a349b122b241c72d069071846 (cherry picked from commit 71b457e4e13ae130fceeec45f19c8430c938e172) Change-Id: Ic1cdc849e024d4c3c220914a0a62316dd2566748
2019-07-26Fill in each dns stats value in message NetworkDnsEventReportedFrank Li
Result dump metric_id: 1111 event_metrics { data { elapsed_timestamp_nanos: 166844290056 atom { network_dns_event_reported { event_type: EVENT_GETADDRINFO return_code: RC_EAI_NO_ERROR latency_micros: 78961 hints_ai_flags: 1024 res_nsend_flags: -1 network_type: NT_UNKNOWN private_dns_modes: PDM_STRICT dns_query_events { dns_query_event { rcode: NS_R_NO_ERROR type: NS_T_A ip_version: IV_IPV4 protocol: PROTO_DOT dns_server_index: 0 latency_micros: 77843 } } } } } Bug: 119862317 Test: ./out/host/linux-x86/bin/statsd_testdrive 116 Merged-In: I07fc15388b3bbc4e8a9aaaa68470cc3d8a187b8e Merged-In: Ic06e6eb30afd62e5da08d478e68d4418949c4116 (cherry picked from commit 35ff7888951031efe52e2de940e268e0aa5395f9) Change-Id: I25eca88dd3881b666135a1dd9d0941fcb697a719
2019-07-26Add NS_R_INTERNAL_ERROR item into NsRcode in stats.protoFrank Li
Bug: 119862317 Test: ./out/host/linux-x86/bin/statsd_testdrive 116 Merged-In: I3521a429d9cec8281d89e6e83419a151af7b81b6 Merged-In: I0cf28032f8079c64253ed3f90fcf9d4705a5b492 (cherry picked from commit 63925b5a5e6e71ee31fe3fc902f4711ba73522d3) Change-Id: Ice31090cfe77cfb3bab75049dfaac6ebfaef290d
2019-07-26Sync the proto stats.proto from dns_resolver.protoFrank Li
(Need to match as aosp/968223) Bug: 119862317 Test: ./out/host/linux-x86/bin/statsd_testdrive 116 Merged-In: I13a40327754600aa57aba41cc9d487f7c9bb036e Merged-In: I7fb3011c206016c3e7b7aab50b03903c0ae894db (cherry picked from commit dc20156cb022e4c821d5ec7cf43fe17e9378f557) Change-Id: Iedae482dafa61d6c3401b12f5414855b0633e439
2019-07-17Explicitly require root privs for tests requiring itBernie Innocenti
These tests currently require root privs to interact with netd: resolv_integration_test libnetdbpf_test netd_unit_test netd_integration_test Bug: 134891412 Bug: 136633978 Test: atest Merged-In: Ib7387d83d0da5dde0ee43a164ee01989a458ae8a (cherry picked from commit 4d89d8bda75c3e9dd05da494c284ec791545f64e) Change-Id: I7c61ab2d68437c31339a5950f308b33cd2f1d8d6
2019-07-09Merge "Fix kernel net tests fail in user build" into qt-r1-devTreeHugger Robot
2019-07-09Fix kernel net tests fail in user buildmarkchien
Before this change, system routing only can be bypassed by the debug build process. This change let the process running as root can bypass system routing if this process have specific env flag. In other word, the other processes own by root would not be affected if they don't set the specific env flag. Bug: 135422468 Test: run vts -m VtsKernelNetTest in both user and eng build Change-Id: I39d0b0141ef51c6f16052ffc785d1d2f523cf11f
2019-07-02Drop packets to the clat address.Lorenzo Colitti
am: cfc15dd035 Change-Id: Ida3bdac9ce0acf5c70e84dc76d87078e19cf714d
2019-07-02Drop packets to the clat address.android10-devLorenzo Colitti
These packets are not needed for 464xlat to function because clatd reads packets from packet sockets, which run before iptables, and the TC action also happens before packet sockets. Their existence complicates data usage accounting, and in certain situations results in applications receiving duplicate UDP packets. Bug: 65674744 Bug: 136193260 Test: atest netd_unit_test Merged-In: I26bd8a1e7a54dbac86971b4e62f88f46ae5466f1 Change-Id: Iab2a64d8a8a380a2448170c9af5109b969527861 (cherry picked from commit 906da1d1ca4b3c61f2f46359480105f647ba4aa8)
2019-07-02Drop packets to the clat address.Lorenzo Colitti
These packets are not needed for 464xlat to function because clatd reads packets from packet sockets, which run before iptables, and the TC action also happens before packet sockets. Their existence complicates data usage accounting, and in certain situations results in applications receiving duplicate UDP packets. Bug: 65674744 Bug: 136193260 Test: atest netd_unit_test Merged-In: I26bd8a1e7a54dbac86971b4e62f88f46ae5466f1 Change-Id: Iab2a64d8a8a380a2448170c9af5109b969527861 (cherry picked from commit cbb2447617d77bc8982945ebc2876a166559b585)
2019-07-01Merge "Revert "Look for the resolver library in /system/apex as well as ↵Linus Tufvesson
/apex."" into qt-dev am: 8f6f89ccd3 Change-Id: Id954f8a85a87cf4c37fd481d121836db5f60397b
2019-07-01Merge "Revert "Look for the resolver library in /system/apex as well as ↵Linus Tufvesson
/apex."" into qt-dev
2019-07-01Revert "Look for the resolver library in /system/apex as well as /apex."Linus Tufvesson
This reverts commit 85fef6c910bd429a3fe6c582747416ca1348f479. Reason for revert: Related to ag/8295108 which is being reverted because it prevents sailfish, marlin and hawk from booting Change-Id: I1089cbc35afc330a60dfae57d23489be1452dddc
2019-07-01Merge "Look for the resolver library in /system/apex as well as /apex." into ↵Lorenzo Colitti
qt-dev am: cca92fcf2d Change-Id: I1868fb7d0f9b24e4a48b8fe2c07d8b85b70c9323
2019-07-01Merge "Look for the resolver library in /system/apex as well as /apex." into ↵TreeHugger Robot
qt-dev
2019-06-29Look for the resolver library in /system/apex as well as /apex.Lorenzo Colitti
This is necessary to use prebuilt APEXes on devices such as marlin that don't support unflattened APEX. Test: None Bug: 136251130 Change-Id: I703053cefc0d070f34d60f460fb055e17a89f355
2019-06-21Link netd_integration_test with libqtaguid.so staticallyHsin-Yi Chen
am: a3c52145e0 Change-Id: I53eff9a1dde8aa19d8f38361717d5e1289de145c
2019-06-21Link netd_integration_test with libqtaguid.so staticallyHsin-Yi Chen
This commit fixes the link error of 32-bit libqtaguid.so on GSI. Bug: 134912820 Test: vts-tradefed run vts -m VtsKernelNetdTest Change-Id: I5c7c2e5e1655841939415a141f7896aa646e9cfe Merged-In: I5c7c2e5e1655841939415a141f7896aa646e9cfe (cherry picked from commit 4d4116988b2840bab3ed6236e8e558c064bc2a2b)
2019-06-14Merge "Revert "Temporarily disable NetworkPermissionDefault in cuttlefish"" ↵Alistair Delva
into qt-dev am: 5aa51a7e90 Change-Id: If72a514d23998e5a420006ee5d9e37484b62dc87
2019-06-15Merge "Revert "Temporarily disable NetworkPermissionDefault in cuttlefish"" ↵Alistair Delva
into qt-dev
2019-06-11Merge "qt-dev should be v290000000 and targetSdkVersion=29" into qt-devAkshay Thakker
am: 03747d6ba4 Change-Id: I974e5b052e3474cefeed7e0575460ca463831039
2019-06-11Merge "qt-dev should be v290000000 and targetSdkVersion=29" into qt-devAkshay Thakker
2019-06-11Add comments to frozen netd AIDL API filesRemi NGUYEN VAN
am: 4c3040e6d9 Change-Id: Ifb1081ef592e4264a5dea4b61c160266bb688da6
2019-06-10Revert "Temporarily disable NetworkPermissionDefault in cuttlefish"Maciej Zenczykowski
This reverts commit 4e7b6b03226b77ec74421261a2de1e269a4eca47. (but it does not revert the tiny fix portion of it) Reason for revert: no longer broken Bug: 133653863 Change-Id: I1dfbd70b799ed3b9cff652d3a3a4b5971d1f8973
2019-06-10Add comments to frozen netd AIDL API filesRemi NGUYEN VAN
Generated by re-freezing the API with the new aidl_interface code, and replacing the previous API with the new files. This only adds comments. Test: comments only, builds Bug: 134452637 Merged-In: I101ffee4045592d51417d3c954c54b2edfdd332d (cherry picked from commit f6ff9b4068f96f5db0ac900f1a4ee8fa92736d9a) Change-Id: I67eeb159696edf596dd937f6e630e91bfb6821ce
2019-06-07qt-dev should be v290000000 and targetSdkVersion=29Akshay
Bug: 129546105 Change-Id: I916410bf3d8d7fd693e3aa113b5633f188e9696e
2019-06-05Use Apache license for newly added filesBernie Innocenti
am: 54672268a8 Change-Id: I8d8534cfc2b2335dd2d5d72ffaebea0e5c8ccc0a