summaryrefslogtreecommitdiffstats
path: root/usr/local/www/services_dnsmasq.php
diff options
context:
space:
mode:
authorBill Marquette <billm@pfsense.org>2006-11-11 17:52:40 +0000
committerBill Marquette <billm@pfsense.org>2006-11-11 17:52:40 +0000
commit6a01ea44fbb8ed7144eed374a77681f32cf17cac (patch)
tree286b2936b36489f41f67c61bbea2a5c3189e3a48 /usr/local/www/services_dnsmasq.php
parent0dbac999dc6f706c5496bb0bc7c4bc40aacb6dba (diff)
downloadpfsense-6a01ea44fbb8ed7144eed374a77681f32cf17cac.zip
pfsense-6a01ea44fbb8ed7144eed374a77681f32cf17cac.tar.gz
MFC [15285]
add dhcpd static mappings to dns forwarder
Diffstat (limited to 'usr/local/www/services_dnsmasq.php')
-rwxr-xr-xusr/local/www/services_dnsmasq.php34
1 files changed, 31 insertions, 3 deletions
diff --git a/usr/local/www/services_dnsmasq.php b/usr/local/www/services_dnsmasq.php
index 841560e..9c6ab8f 100755
--- a/usr/local/www/services_dnsmasq.php
+++ b/usr/local/www/services_dnsmasq.php
@@ -33,6 +33,7 @@ require("guiconfig.inc");
$pconfig['enable'] = isset($config['dnsmasq']['enable']);
$pconfig['regdhcp'] = isset($config['dnsmasq']['regdhcp']);
+$pconfig['regdhcpstatic'] = isset($config['dnsmasq']['regdhcpstatic']);
if (!is_array($config['dnsmasq']['hosts']))
$config['dnsmasq']['hosts'] = array();
@@ -51,6 +52,7 @@ if ($_POST) {
$config['dnsmasq']['enable'] = ($_POST['enable']) ? true : false;
$config['dnsmasq']['regdhcp'] = ($_POST['regdhcp']) ? true : false;
+ $config['dnsmasq']['regdhcpstatic'] = ($_POST['regdhcpstatic']) ? true : false;
write_config();
@@ -94,10 +96,21 @@ include("head.inc");
?>
+<script language="JavaScript">
+<!--
+function enable_change(enable_over) {
+ var endis;
+ endis = !(document.iform.enable.checked || enable_over);
+ document.iform.regdhcp.disabled = endis;
+ document.iform.regdhcpstatic.disabled = endis;
+}
+//-->
+</script>
+
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
<?php include("fbegin.inc"); ?>
<p class="pgtitle"><?=$pgtitle?></p>
-<form action="services_dnsmasq.php" method="post">
+<form action="services_dnsmasq.php" method="post" name="iform" id="iform">
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (file_exists($d_hostsdirty_path)): ?><p>
<?php print_info_box_np("The DNS forwarder configuration has been changed.<br>You must apply the changes in order for them to take effect.");?><br>
@@ -105,7 +118,7 @@ include("head.inc");
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
<td class="vtable"><p>
- <input name="enable" type="checkbox" id="enable" value="yes" <?php if ($pconfig['enable'] == "yes") echo "checked";?>>
+ <input name="enable" type="checkbox" id="enable" value="yes" <?php if ($pconfig['enable'] == "yes") echo "checked";?> onClick="enable_change(false)">
<strong>Enable DNS forwarder<br>
</strong></p></td>
</tr>
@@ -121,7 +134,17 @@ include("head.inc");
</td>
</tr>
<tr>
- <td> <input name="submit" type="submit" class="formbtn" value="Save">
+ <td class="vtable"><p>
+ <input name="regdhcpstatic" type="checkbox" id="regdhcpstatic" value="yes" <?php if ($pconfig['regdhcpstatic'] == "yes") echo "checked";?>>
+ <strong>Register DHCP static mappings in DNS forwarder<br>
+ </strong>If this option is set, then DHCP static mappings will
+ be registered in the DNS forwarder, so that their name can be
+ resolved. You should also set the domain in <a href="system.php">
+ System: General setup</a> to the proper value.</p>
+ </td>
+ </tr>
+ <tr>
+ <td> <input name="submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
</td>
</tr>
<tr>
@@ -221,6 +244,11 @@ include("head.inc");
</tr>
</table>
</form>
+<script language="JavaScript">
+<!--
+enable_change(false);
+//-->
+</script>
<?php include("fend.inc"); ?>
</body>
</html>
OpenPOWER on IntegriCloud