status = specific_getaddrinfo(ipv4_name, &hints, &result);
else
status = getaddrinfo(ipv4_name, NULL, &hints, &result);
+
+ if (status != 0) {
+ CLATD_LOG(LOG_ERROR, "plat_prefix/dns(%s) status = %d/%s", ipv4_name, status,
+ gai_strerror(status));
+ return 0;
+ }
#else
// Be sure to query local DNS64 servers, bypassing Private DNS (if enabled).
if (net_id != NETID_UNSET) {
}
status = android_getaddrinfofornet(ipv4_name, NULL, &hints, net_id, MARK_UNSET, &result);
-#endif
+
if (status != 0 || result == NULL) {
CLATD_LOG(LOG_ERROR, "plat_prefix/dns(%s) status = %d/%s", ipv4_name, status,
gai_strerror(status));
return 0;
}
+#endif
// Use only the first result. If other records are present, possibly with
// differing DNS64 prefixes they are ignored (there is very little sensible