Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77316 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 3944 invoked from network); 18 Sep 2014 20:31:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Sep 2014 20:31:37 -0000 Authentication-Results: pb1.pair.com smtp.mail=figureonecpr@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=figureonecpr@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.195 as permitted sender) X-PHP-List-Original-Sender: figureonecpr@gmail.com X-Host-Fingerprint: 209.85.212.195 mail-wi0-f195.google.com Received: from [209.85.212.195] ([209.85.212.195:53321] helo=mail-wi0-f195.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B3/E2-18130-8214B145 for ; Thu, 18 Sep 2014 16:31:37 -0400 Received: by mail-wi0-f195.google.com with SMTP id cc10so246460wib.2 for ; Thu, 18 Sep 2014 13:31:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=Mpq2MUDirT2dLAJSGjC3hOUEIbHF243b2jHbMz4u9po=; b=E8mvdWuzw/TyxZtl5qlkg1qG4EkvgA+Uzs/WiFKRJE25/tAL3jo4ATYWS9TTxlvU4W pfRah9HiS1mTIdapmxIkPaCGPrvbbiKOzLh+ECtlbffBvVpiXIRJokaFfEEaA8LhGzZI f1e2IyUk//3ZJC+dDhdHKfub1yoIHG5HM9pfU3UA2CeOGPx1UwkQsH3A+3P9QtqD3fWr DM0FvGyenP3y99ctJ7KkI8107Gr0a7OY428raPR6NSerbH4QQCpJ5eCJ5djEaRCJMiK+ BgtskWTyGbj1Wj/+PlXgN5d2VKW8c35fAVEYkM0luFeQCTw/E6vY0c3rGEHqU/oMOJef +8/Q== MIME-Version: 1.0 X-Received: by 10.180.73.6 with SMTP id h6mr1506511wiv.65.1411072293672; Thu, 18 Sep 2014 13:31:33 -0700 (PDT) Received: by 10.216.194.132 with HTTP; Thu, 18 Sep 2014 13:31:33 -0700 (PDT) Date: Thu, 18 Sep 2014 16:31:33 -0400 Message-ID: To: Kris Craig Content-Type: multipart/alternative; boundary=f46d043c7f04d11eee05035cde79 Subject: [PHP-DEV] Why does checkdnsrr() default to MX?? From: figureonecpr@gmail.com (Sanford Whiteman) --f46d043c7f04d11eee05035cde79 Content-Type: text/plain; charset=UTF-8 ANY (*) requests are key to many DNS amplification attacks and may fail, even if the RR you want exists when individually requested. Such requests should be discouraged by clients, IMO. It's disappointing that PHP's dns_get_record() defaults to ANY. But more to the point, what is the client-side utility? You are basically flooding yourself if you make such requests -- what exactly are you going to do with the TXT records, NS records, the SOAs, the unknown types? This is just a ton of extraneous data, even if the overall payload is small. Maybe if you're building a PHP app whose sole purpose is to troubleshoot DNS. But if so I would sooner fork `dig`, since most likely you are trying to show people the results that a non-PHP app would see, so better to avoid any PHP bugs/specialness and miss any DNS features (such as new RR types and new DNS extensions). I don't think there's anything particularly askew in MX being the default for checkdnsrr() if you think of it as a cut-down generalization of getdnsmx(). Still I can't remember the last time my PHP apps cared only about whether an RR existed, not its value (our mail server cares about that of course when checking blacklists, and we care when we're troubleshooting... but not within PHP). And I've *never *wanted to get a true/false *if there is an RR of any type, *as opposed to a true/false if the domain exists at all in the public DNS. Can you explain the use case? -- Sandy --f46d043c7f04d11eee05035cde79--