Improve prioritizing DNS servers to handle no permission failure
The quality of a DNS server should not dramatically drop if
the failure is due to no permission.
Bug: 137169582
Test: ran resolv_unit_test
Test: ran resolv_integration_test with the sorting enabled
Change-Id: Idad2ef2c34e708bd4bd64c50669de21f1abe3ac0
diff --git a/DnsStats.h b/DnsStats.h
index c5459b4..39025d3 100644
--- a/DnsStats.h
+++ b/DnsStats.h
@@ -68,7 +68,8 @@
class StatsRecords {
public:
struct Record {
- int rcode;
+ int rcode = 0; // NS_R_NO_ERROR
+ int linux_errno = 0; // SYS_NO_ERROR
std::chrono::microseconds latencyUs;
};