Project

General

Profile

« Previous | Next » 

Revision aa994814

Added by Andrew Thompson about 14 years ago

Allow DHCP mappings to be resolved first for reverse lookups.

This was affecting a kerberos installation where the first DNS alias was
given for the PTR instead of the static DHCP mapping name, breaking the
kerberos tokens.

View differences:

usr/local/www/services_dnsmasq.php
47 47
$pconfig['enable'] = isset($config['dnsmasq']['enable']);
48 48
$pconfig['regdhcp'] = isset($config['dnsmasq']['regdhcp']);
49 49
$pconfig['regdhcpstatic'] = isset($config['dnsmasq']['regdhcpstatic']);
50
$pconfig['dhcpfirst'] = isset($config['dnsmasq']['dhcpfirst']);
50 51

  
51 52
if (!is_array($config['dnsmasq']['hosts']))
52 53
	$config['dnsmasq']['hosts'] = array();
......
65 66
	$config['dnsmasq']['enable'] = ($_POST['enable']) ? true : false;
66 67
	$config['dnsmasq']['regdhcp'] = ($_POST['regdhcp']) ? true : false;
67 68
	$config['dnsmasq']['regdhcpstatic'] = ($_POST['regdhcpstatic']) ? true : false;
69
	$config['dnsmasq']['dhcpfirst'] = ($_POST['dhcpfirst']) ? true : false;
68 70

  
69 71
	write_config();
70 72

  
......
112 114
	endis = !(document.iform.enable.checked || enable_over);
113 115
	document.iform.regdhcp.disabled = endis;
114 116
	document.iform.regdhcpstatic.disabled = endis;
117
	document.iform.dhcpfirst.disabled = endis;
115 118
}
116 119
//-->
117 120
</script>
......
151 154
					"System: General setup%s to the proper value."),'<a href="system.php">','</a>');?></p>
152 155
		</td>
153 156
	</tr>
157
	<tr>
158
		<td class="vtable"><p>
159
			<input name="dhcpfirst" type="checkbox" id="dhcpfirst" value="yes" <?php if ($pconfig['dhcpfirst'] == "yes") echo "checked";?>>
160
			<strong><?=gettext("Resolve DHCP mappings first");?><br>
161
			</strong><?php printf(gettext("If this option is set, then DHCP mappings will ".
162
					"be resolved before the manual list of names below. This only ".
163
					"affects the name given for a reverse lookup (PTR).");?></p>
164
		</td>
165
	</tr>
154 166
	<tr>
155 167
		<td>
156 168
			<input name="submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" onclick="enable_change(true)">

Also available in: Unified diff