DNSの修正

守矢諏訪子 <suwako@076.moe>、2026-11-11 00:40
コミット 45df974e7469fdc9408ac33ac6edf1a4fd04d303 ・親 20054fe ・ファイルを見る

1個のファイル、+2 -3

@@ -573,9 +573,8 @@
573573 if (filter_var($host, FILTER_VALIDATE_IP)) {
574574 $ips = [$host];
575575 } else {
576- $ips = [];
577- foreach ((@dns_get_record($host, DNS_A | DNS_AAAA) ?: []) as $r) {
578- if (isset($r['ip'])) $ips[] = $r['ip'];
576+ $ips = @gethostbynamel($host) ?: [];
577+ foreach ((@dns_get_record($host, DNS_AAAA) ?: []) as $r) {
579578 if (isset($r['ipv6'])) $ips[] = $r['ipv6'];
580579 }
581580 }