aboutsummaryrefslogtreecommitdiffstats
path: root/config/tinydns/tinydns.inc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2011-09-21 16:11:37 -0400
committerjim-p <jimp@pfsense.org>2011-09-21 16:12:11 -0400
commitd5ba5b16c18cb98dca5bb49aac63274b181134ba (patch)
tree435ac3a3f2d9fb9d12b0df7aa13d1d633c621c81 /config/tinydns/tinydns.inc
parent195dee5f7411de7fe55087bb819b02f8f864c7fc (diff)
downloadpfsense-packages-d5ba5b16c18cb98dca5bb49aac63274b181134ba.tar.gz
pfsense-packages-d5ba5b16c18cb98dca5bb49aac63274b181134ba.tar.bz2
pfsense-packages-d5ba5b16c18cb98dca5bb49aac63274b181134ba.zip
Handle an IPv6 PTR SOA manual record.
Diffstat (limited to 'config/tinydns/tinydns.inc')
-rw-r--r--config/tinydns/tinydns.inc13
1 files changed, 12 insertions, 1 deletions
diff --git a/config/tinydns/tinydns.inc b/config/tinydns/tinydns.inc
index f18a86a7..bf0cb4b8 100644
--- a/config/tinydns/tinydns.inc
+++ b/config/tinydns/tinydns.inc
@@ -728,7 +728,18 @@ function tinydns_get_rowline_data($recordip, $recordtype, $ttl, $hostname, $rdns
/* Note that some of these are simplistic versions of TinyDNS record handling. Uber-users can always do "raw" entries... */
case "SOA":
// .fqdn:ip:x:ttl:timestamp:lo
- $record_data = ".{$hostname}::{$recordip}{$ttl_string}";
+ if (intval($config['version']) <= 8) {
+ $record_data = ".{$hostname}::{$recordip}{$ttl_string}";
+ } else {
+ if (is_ipaddrv6($hostname)) {
+ list($rip, $rmask) = explode("/", $hostname);
+ $rmask = empty($rmask) ? 128 : $rmask;
+ $ip6_arpa = tinydns_get_ip6_subnet_arpa($rip, $rmask);
+ $record_data = ".{$ip6_arpa[1]}::{$recordip}{$ttl_string}";
+ } else {
+ $record_data = ".{$hostname}::{$recordip}{$ttl_string}";
+ }
+ }
break;
case "NS":
// &serious.panic.mil:1.8.248.6:a