diff options
-rw-r--r-- | etc/inc/services.inc | 4 | ||||
-rw-r--r-- | usr/local/www/services_rfc2136_edit.php | 30 |
2 files changed, 14 insertions, 20 deletions
diff --git a/etc/inc/services.inc b/etc/inc/services.inc index 22a19de..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) && !isset($dnsupdate['ignoreipv4'])) { + 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) && !isset($dnsupdate['ignoreipv6'])) { + 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 aeb20a6..6bb0ebe 100644 --- a/usr/local/www/services_rfc2136_edit.php +++ b/usr/local/www/services_rfc2136_edit.php @@ -60,8 +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['ignoreipv4'] = isset($a_rfc2136[$id]['ignoreipv4']); - $pconfig['ignoreipv6'] = isset($a_rfc2136[$id]['ignoreipv6']); + $pconfig['addresses'] = $a_rfc2136[$id]['addresses']; + if (!$pconfig['addresses']) + $pconfig['addresses'] = "both"; $pconfig['descr'] = $a_rfc2136[$id]['descr']; } @@ -97,8 +98,7 @@ if ($_POST) { $rfc2136['server'] = $_POST['server']; $rfc2136['usetcp'] = $_POST['usetcp'] ? true : false; $rfc2136['usepublicip'] = $_POST['usepublicip'] ? true : false; - $rfc2136['ignoreipv4'] = $_POST['ignoreipv4'] ? true : false; - $rfc2136['ignoreipv6'] = $_POST['ignoreipv6'] ? true : false; + $rfc2136['addresses'] = $_POST['addresses']; $rfc2136['interface'] = $_POST['interface']; $rfc2136['descr'] = $_POST['descr']; @@ -208,20 +208,14 @@ include("head.inc"); <strong><?=gettext("If the interface IP is private, attempt to fetch and use the public IP instead.");?></strong> </td> </tr> - <tr> - <td width="22%" valign="top" class="vncellreq"><?=gettext("Ignore IPv4 address");?></td> - <td width="78%" class="vtable"> - <input name="ignoreipv4" type="checkbox" id="ignoreipv4" value="<?=gettext("yes");?>" <?php if ($pconfig['ignoreipv4']) echo "checked=\"checked\""; ?> /> - <strong><?=gettext("Don't register an IPv4 address.");?></strong> - </td> - </tr> - <tr> - <td width="22%" valign="top" class="vncellreq"><?=gettext("Ignore IPv6 address");?></td> - <td width="78%" class="vtable"> - <input name="ignoreipv6" type="checkbox" id="ignoreipv6" value="<?=gettext("yes");?>" <?php if ($pconfig['ignoreipv6']) echo "checked=\"checked\""; ?> /> - <strong><?=gettext("Don't register an IPv6 address.");?></strong> - </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"> |