diff options
-rw-r--r-- | etc/inc/services.inc | 4 | ||||
-rw-r--r-- | usr/local/www/services_rfc2136_edit.php | 12 |
2 files changed, 14 insertions, 2 deletions
diff --git a/etc/inc/services.inc b/etc/inc/services.inc index c3e2fe2..73d6f50 100644 --- a/etc/inc/services.inc +++ b/etc/inc/services.inc @@ -2422,7 +2422,7 @@ EOD; conf_mount_rw(); /* Update IPv4 if we have it. */ - if (is_ipaddrv4($wanip)) { + if (is_ipaddrv4($wanip) && $dnsupdate['addresses'] != "ipv6") { if (($wanip != $cachedipv4) || (($currentTime - $cacheTimev4) > $maxCacheAgeSecs) || $forced) { $upinst .= "update delete {$dnsupdate['host']}. A\n"; $upinst .= "update add {$dnsupdate['host']}. {$dnsupdate['ttl']} A {$wanip}\n"; @@ -2438,7 +2438,7 @@ EOD; } /* Update IPv6 if we have it. */ - if (is_ipaddrv6($wanipv6)) { + if (is_ipaddrv6($wanipv6) && $dnsupdate['addresses'] != "ipv4") { if (($wanipv6 != $cachedipv6) || (($currentTime - $cacheTimev6) > $maxCacheAgeSecs) || $forced) { $upinst .= "update delete {$dnsupdate['host']}. AAAA\n"; $upinst .= "update add {$dnsupdate['host']}. {$dnsupdate['ttl']} AAAA {$wanipv6}\n"; diff --git a/usr/local/www/services_rfc2136_edit.php b/usr/local/www/services_rfc2136_edit.php index 523042c..6bb0ebe 100644 --- a/usr/local/www/services_rfc2136_edit.php +++ b/usr/local/www/services_rfc2136_edit.php @@ -60,6 +60,9 @@ if (isset($id) && isset($a_rfc2136[$id])) { $pconfig['interface'] = $a_rfc2136[$id]['interface']; $pconfig['usetcp'] = isset($a_rfc2136[$id]['usetcp']); $pconfig['usepublicip'] = isset($a_rfc2136[$id]['usepublicip']); + $pconfig['addresses'] = $a_rfc2136[$id]['addresses']; + if (!$pconfig['addresses']) + $pconfig['addresses'] = "both"; $pconfig['descr'] = $a_rfc2136[$id]['descr']; } @@ -95,6 +98,7 @@ if ($_POST) { $rfc2136['server'] = $_POST['server']; $rfc2136['usetcp'] = $_POST['usetcp'] ? true : false; $rfc2136['usepublicip'] = $_POST['usepublicip'] ? true : false; + $rfc2136['addresses'] = $_POST['addresses']; $rfc2136['interface'] = $_POST['interface']; $rfc2136['descr'] = $_POST['descr']; @@ -205,6 +209,14 @@ include("head.inc"); </td> </tr> <tr> + <td valign="top" class="vncellreq"><?=gettext("Address Registration");?> </td> + <td class="vtable"> + <input name="addresses" type="radio" value="ipv4" <?php if ($pconfig['addresses'] == "ipv4") echo "checked=\"checked\""; ?> /> <?=gettext("IPv4");?> + <input name="addresses" type="radio" value="ipv6" <?php if ($pconfig['addresses'] == "ipv6") echo "checked=\"checked\""; ?> /> <?=gettext("IPv6");?> + <input name="addresses" type="radio" value="both" <?php if ($pconfig['addresses'] == "both") echo "checked=\"checked\""; ?> /> <?=gettext("Both");?> + </td> + </tr> + <tr> <td width="22%" valign="top" class="vncellreq"><?=gettext("Description");?></td> <td width="78%" class="vtable"> <input name="descr" type="text" class="formfld unknown" id="descr" size="60" value="<?=htmlspecialchars($pconfig['descr']);?>" /> |