From 99db533524177a986e255fe02bb2e23df02bb238 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Wed, 13 Jul 2011 00:55:26 +0200 Subject: [PATCH 1/3] [ticket/10257] Add missing break statement after CNAME block. PHPBB3-10257 --- phpBB/includes/functions.php | 1 + 1 file changed, 1 insertion(+) diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index b1c1c14d0c..e113a32a87 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -3686,6 +3686,7 @@ function phpbb_checkdnsrr($host, $type = 'MX') { return true; } + break; default: case 'A': From ae8eee16cce29ea3ecae95ac19c49b0fa62ff978 Mon Sep 17 00:00:00 2001 From: Patrick Webster Date: Sat, 9 Jul 2011 16:03:02 -0500 Subject: [PATCH 2/3] [ticket/10257] Fix AAAA record parsing for old versions of Windows Older versions of Windows use a different output format for AAAA records. PHPBB3-10257 --- phpBB/includes/functions.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index e113a32a87..c878efcd6b 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -3689,8 +3689,13 @@ function phpbb_checkdnsrr($host, $type = 'MX') break; default: - case 'A': case 'AAAA': + if (stripos($line, "$host AAAA IPv6 address") === 0) + { + return true; + } + //No break, newer versions of Windows output AAAA in the same way as the A records + case 'A': if (!empty($host_matches)) { // Second line From 271c277ecc570de1ed0f5e38347eb00d987fbbd1 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Wed, 13 Jul 2011 01:05:34 +0200 Subject: [PATCH 3/3] [ticket/10257] Slightly adjust comments about AAAA records on Windows XP/2003. PHPBB3-10257 --- phpBB/includes/functions.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index c878efcd6b..121386b769 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -3690,11 +3690,14 @@ function phpbb_checkdnsrr($host, $type = 'MX') default: case 'AAAA': + // AAAA records returned by nslookup on Windows XP/2003 have this format. + // Later Windows versions use the A record format below for AAAA records. if (stripos($line, "$host AAAA IPv6 address") === 0) { return true; } - //No break, newer versions of Windows output AAAA in the same way as the A records + // No break + case 'A': if (!empty($host_matches)) {