diff options
author | Chris Buechler <cmb@pfsense.org> | 2009-06-25 02:29:35 -0400 |
---|---|---|
committer | Chris Buechler <cmb@pfsense.org> | 2009-06-25 02:29:35 -0400 |
commit | 366810dfddcfad93c391a79d7ef16d628ef94ea7 (patch) | |
tree | b9b96cf81b9c88b5483fa56c9d851c8651732a77 | |
parent | c057951e83946298dcb1d47b6d10efcb359d6505 (diff) | |
download | pfsense-366810dfddcfad93c391a79d7ef16d628ef94ea7.zip pfsense-366810dfddcfad93c391a79d7ef16d628ef94ea7.tar.gz |
Patch from Aarno Aukia for cvstrac ticket #1932
-rw-r--r-- | etc/inc/services.inc | 7 | ||||
-rwxr-xr-x | usr/local/www/services_dyndns.php | 13 |
2 files changed, 16 insertions, 4 deletions
diff --git a/etc/inc/services.inc b/etc/inc/services.inc index f55e6d4..1813860 100644 --- a/etc/inc/services.inc +++ b/etc/inc/services.inc @@ -925,7 +925,10 @@ EOD; fclose($fd); /* generate update instructions */ - $upinst = "update delete {$config['dnsupdate']['host']} A\n"; + $upinst = ""; + if ($config['dnsupdate']['server']) + $upinst .= "server {$config['dnsupdate']['server']}\n"; + $upinst .= "update delete {$config['dnsupdate']['host']} A\n"; $upinst .= "update add {$config['dnsupdate']['host']} {$config['dnsupdate']['ttl']} A {$wanip}\n"; $upinst .= "\n"; /* mind that trailing newline! */ @@ -1311,4 +1314,4 @@ function upnp_start() { } } -?>
\ No newline at end of file +?> diff --git a/usr/local/www/services_dyndns.php b/usr/local/www/services_dyndns.php index 3c5fe21..3e6591b 100755 --- a/usr/local/www/services_dyndns.php +++ b/usr/local/www/services_dyndns.php @@ -45,6 +45,7 @@ $pconfig['wildcard'] = isset($config['dyndns']['wildcard']); $pconfig['dnsupdate_enable'] = isset($config['dnsupdate']['enable']); $pconfig['dnsupdate_host'] = $config['dnsupdate']['host']; +$pconfig['dnsupdate_server'] = $config['dnsupdate']['server']; $pconfig['dnsupdate_ttl'] = $config['dnsupdate']['ttl']; if (!$pconfig['dnsupdate_ttl']) $pconfig['dnsupdate_ttl'] = 60; @@ -106,6 +107,7 @@ if ($_POST) { $config['dnsupdate']['enable'] = $_POST['dnsupdate_enable'] ? true : false; $config['dnsupdate']['host'] = $_POST['dnsupdate_host']; + $config['dnsupdate']['server'] = $_POST['dnsupdate_server']; $config['dnsupdate']['ttl'] = $_POST['dnsupdate_ttl']; $config['dnsupdate']['keyname'] = $_POST['dnsupdate_keyname']; $config['dnsupdate']['keytype'] = $_POST['dnsupdate_keytype']; @@ -146,6 +148,7 @@ function enable_change(enable_change) { endis = !(document.iform.dnsupdate_enable.checked || enable_change); document.iform.dnsupdate_host.disabled = endis; + document.iform.dnsupdate_server.disabled = endis; document.iform.dnsupdate_ttl.disabled = endis; document.iform.dnsupdate_keyname.disabled = endis; document.iform.dnsupdate_keytype[0].disabled = endis; @@ -248,6 +251,12 @@ function enable_change(enable_change) { </td> </tr> <tr> + <td width="22%" valign="top" class="vncell">Server</td> + <td width="78%" class="vtable"> + <input name="dnsupdate_server" type="text" class="formfld" id="dnsupdate_server" size="30" value="<?=htmlspecialchars($pconfig['dnsupdate_server']);?>"> + </td> + </tr> + <tr> <td valign="top" class="vncellreq">TTL</td> <td class="vtable"> <input name="dnsupdate_ttl" type="text" class="formfld" id="dnsupdate_ttl" size="6" value="<?=htmlspecialchars($pconfig['dnsupdate_ttl']);?>"> @@ -261,7 +270,7 @@ function enable_change(enable_change) { This must match the setting on the DNS server.</td> </tr> <tr> - <td valign="top" class="vncellreq">Key type </td> + <td valign="top" class="vncell">Key type </td> <td class="vtable"> <input name="dnsupdate_keytype" type="radio" value="zone" <?php if ($pconfig['dnsupdate_keytype'] == "zone") echo "checked"; ?>> Zone <input name="dnsupdate_keytype" type="radio" value="host" <?php if ($pconfig['dnsupdate_keytype'] == "host") echo "checked"; ?>> Host @@ -275,7 +284,7 @@ function enable_change(enable_change) { Paste an HMAC-MD5 key here.</td> </tr> <tr> - <td width="22%" valign="top" class="vncellreq">Protocol</td> + <td width="22%" valign="top" class="vncell">Protocol</td> <td width="78%" class="vtable"> <input name="dnsupdate_usetcp" type="checkbox" id="dnsupdate_usetcp" value="yes" <?php if ($pconfig['dnsupdate_usetcp']) echo "checked"; ?>> <strong>Use TCP instead of UDP</strong></td> |