Allow v6 addresses in slave and forward zones.
authorJamie Cameron <jcameron@webmin.com>
Mon, 28 Mar 2011 01:44:54 +0000 (18:44 -0700)
committerJamie Cameron <jcameron@webmin.com>
Mon, 28 Mar 2011 01:44:54 +0000 (18:44 -0700)
https://sourceforge.net/tracker/?func=detail&atid=117457&aid=3249178&group_id=17457

bind8/CHANGELOG
bind8/bind8-lib.pl
bind8/create_forward.cgi
bind8/create_slave.cgi

index 0fd7ffe..bb9a15c 100644 (file)
@@ -124,3 +124,4 @@ Added the Delete Records In Selected button to the main page, for removing the s
 ---- Changes since 1.530 ----
 The default view for new zones can now be set via an option on the Module Config page.
 When adding cluster slave servers, their IPs are added to the also-notify and allow-transfer blocks of each domain added to the slave.
+IPv6 addresses can now be used for remote nameservers in slave and delegation zones.
index 24da9d2..0e8bf4f 100755 (executable)
@@ -566,7 +566,7 @@ foreach $av (@{$v->{'members'}}) {
 if ($_[3] == 0) {
        # text area
        return &ui_table_row($_[0],
-               &ui_textarea($_[1], join("\n", @av), 3, 15));
+               &ui_textarea($_[1], join("\n", @av), 3, 50));
        }
 else {
        # text row
@@ -640,7 +640,8 @@ sub save_forwarders
 local ($i, $ip, $pr, @vals);
 for($i=0; defined($ip = $in{"$_[0]_ip_$i"}); $i++) {
        next if (!$ip);
-       &check_ipaddress($ip) || &error(&text('eip', $ip));
+       &check_ipaddress($ip) || &check_ip6address($ip) ||
+               &error(&text('eip', $ip));
        $pr = $in{"$_[0]_pr_${i}_def"} ? undef : $in{"$_[0]_pr_$i"};
        !$pr || $pr =~ /^\d+$/ || &error(&text('eport', $pr));
        push(@vals, { 'name' => $ip,
index 1ec8f8a..8a6dc78 100755 (executable)
@@ -21,8 +21,8 @@ else {
 if ($in{'rev'}) {
        local($ipv4);
        ($ipv4 = &check_net_ip($in{'zone'})) ||
-       $config{'support_aaaa'} &&
-       (($in{'zone'} =~ /^([\w:]+)(\/\d+)$/) || &check_ip6address($1)) ||
+         $config{'support_aaaa'} &&
+         (($in{'zone'} =~ /^([\w:]+)(\/\d+)$/) || &check_ip6address($1)) ||
                &error(&text('create_enet', $in{'zone'}));
        if ($ipv4) {
                $in{'zone'} = &ip_to_arpa($in{'zone'});
@@ -40,7 +40,7 @@ else {
 $in{'zone'} =~ s/\.$//;
 @masters = split(/\s+/, $in{'masters'});
 foreach $m (@masters) {
-       &check_ipaddress($m) ||
+       &check_ipaddress($m) || &check_ip6address($m) ||
                &error(&text('create_emaster', $m));
        }
 #if (!@masters) {
index 7062eef..7a46b92 100755 (executable)
@@ -52,7 +52,7 @@ foreach $z (&find("zone", $vconf)) {
 $masterport = $in{'port_def'} ? undef : $in{'port'};
 @masters = split(/\s+/, $in{'masters'});
 foreach $m (@masters) {
-       &check_ipaddress($m) ||
+       &check_ipaddress($m) || &check_ip6address($m) ||
                &error(&text('create_emaster', $m));
        }
 if (!@masters) {