Project

General

Profile

« Previous | Next » 

Revision 7db3d1c7

Added by Robert Nelson about 10 years ago

Use address types instead of addresses.

View differences:

etc/inc/services.inc
2422 2422

  
2423 2423
				conf_mount_rw();
2424 2424
				/* Update IPv4 if we have it. */
2425
				if (is_ipaddrv4($wanip) && $dnsupdate['addresses'] != "ipv6") {
2425
				if (is_ipaddrv4($wanip) && $dnsupdate['addresstypes'] != "ipv6") {
2426 2426
					if (($wanip != $cachedipv4) || (($currentTime - $cacheTimev4) > $maxCacheAgeSecs) || $forced) {
2427 2427
						$upinst .= "update delete {$dnsupdate['host']}. A\n";
2428 2428
						$upinst .= "update add {$dnsupdate['host']}. {$dnsupdate['ttl']} A {$wanip}\n";
......
2438 2438
				}
2439 2439

  
2440 2440
				/* Update IPv6 if we have it. */
2441
				if (is_ipaddrv6($wanipv6) && $dnsupdate['addresses'] != "ipv4") {
2441
				if (is_ipaddrv6($wanipv6) && $dnsupdate['addresstypes'] != "ipv4") {
2442 2442
					if (($wanipv6 != $cachedipv6) || (($currentTime - $cacheTimev6) > $maxCacheAgeSecs) || $forced) {
2443 2443
						$upinst .= "update delete {$dnsupdate['host']}. AAAA\n";
2444 2444
						$upinst .= "update add {$dnsupdate['host']}. {$dnsupdate['ttl']} AAAA {$wanipv6}\n";
usr/local/www/services_rfc2136_edit.php
60 60
	$pconfig['interface'] = $a_rfc2136[$id]['interface'];
61 61
	$pconfig['usetcp'] = isset($a_rfc2136[$id]['usetcp']);
62 62
	$pconfig['usepublicip'] = isset($a_rfc2136[$id]['usepublicip']);
63
	$pconfig['addresses'] = $a_rfc2136[$id]['addresses'];
64
	if (!$pconfig['addresses'])
65
		$pconfig['addresses'] = "both";
63
	$pconfig['addresstypes'] = $a_rfc2136[$id]['addresstypes'];
64
	if (!$pconfig['addresstypes'])
65
		$pconfig['addresstypes'] = "both";
66 66
	$pconfig['descr'] = $a_rfc2136[$id]['descr'];
67 67

  
68 68
}
......
98 98
		$rfc2136['server'] = $_POST['server'];
99 99
		$rfc2136['usetcp'] = $_POST['usetcp'] ? true : false;
100 100
		$rfc2136['usepublicip'] = $_POST['usepublicip'] ? true : false;
101
		$rfc2136['addresses'] = $_POST['addresses'];
101
		$rfc2136['addresstypes'] = $_POST['addresstypes'];
102 102
		$rfc2136['interface'] = $_POST['interface'];
103 103
		$rfc2136['descr'] = $_POST['descr'];
104 104

  
......
209 209
			</td>
210 210
		</tr>
211 211
                <tr>
212
                  <td valign="top" class="vncellreq"><?=gettext("Address Registration");?> </td>
212
                  <td valign="top" class="vncellreq"><?=gettext("Address Types");?> </td>
213 213
                  <td class="vtable">
214
                    <input name="addresses" type="radio" value="ipv4" <?php if ($pconfig['addresses'] == "ipv4") echo "checked=\"checked\""; ?> /> <?=gettext("IPv4");?> &nbsp;
215
                    <input name="addresses" type="radio" value="ipv6" <?php if ($pconfig['addresses'] == "ipv6") echo "checked=\"checked\""; ?> /> <?=gettext("IPv6");?> &nbsp;
216
                    <input name="addresses" type="radio" value="both" <?php if ($pconfig['addresses'] == "both") echo "checked=\"checked\""; ?> /> <?=gettext("Both");?>
214
                    <input name="addresstypes" type="radio" value="ipv4" <?php if ($pconfig['addresstypes'] == "ipv4") echo "checked=\"checked\""; ?> /> <?=gettext("IPv4");?> &nbsp;
215
                    <input name="addresstypes" type="radio" value="ipv6" <?php if ($pconfig['addresstypes'] == "ipv6") echo "checked=\"checked\""; ?> /> <?=gettext("IPv6");?> &nbsp;
216
                    <input name="addresstypes" type="radio" value="both" <?php if ($pconfig['addresstypes'] == "both") echo "checked=\"checked\""; ?> /> <?=gettext("Both");?>
217 217
                  </td>
218 218
                </tr>
219 219
                <tr>

Also available in: Unified diff