summaryrefslogtreecommitdiffstats
path: root/etc
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 /etc
parent0dbac999dc6f706c5496bb0bc7c4bc40aacb6dba (diff)
downloadpfsense-6a01ea44fbb8ed7144eed374a77681f32cf17cac.zip
pfsense-6a01ea44fbb8ed7144eed374a77681f32cf17cac.tar.gz
MFC [15285]
add dhcpd static mappings to dns forwarder
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/services.inc10
-rw-r--r--etc/inc/system.inc7
2 files changed, 14 insertions, 3 deletions
diff --git a/etc/inc/services.inc b/etc/inc/services.inc
index cea79fe..b3ef24e 100644
--- a/etc/inc/services.inc
+++ b/etc/inc/services.inc
@@ -560,6 +560,8 @@ EOD;
function services_dnsmasq_configure() {
global $config, $g;
+ $return = 0;
+
if(isset($config['system']['developerspew'])) {
$mt = microtime();
echo "services_dnsmasq_configure() being called $mt\n";
@@ -576,7 +578,8 @@ function services_dnsmasq_configure() {
sleep(1);
/* generate hosts file */
- system_hosts_generate();
+ if(system_hosts_generate()!=0)
+ $return = 1;
$args = "";
@@ -600,10 +603,11 @@ function services_dnsmasq_configure() {
}
if (!$g['booting']) {
- services_dhcpd_configure();
+ if(services_dhcpd_configure()!=0)
+ $return = 1;
}
- return 0;
+ return $return;
}
function services_snmpd_configure() {
diff --git a/etc/inc/system.inc b/etc/inc/system.inc
index bd5c2fa..eadb100 100644
--- a/etc/inc/system.inc
+++ b/etc/inc/system.inc
@@ -185,6 +185,13 @@ EOD;
else
$hosts .= "{$host['ip']} {$host['domain']}\n";
}
+ if (isset($dnsmasqcfg['regdhcpstatic'])) {
+ foreach ($config['dhcpd'] as $dhcpif => $dhcpifconf)
+ if(is_array($dhcpifconf['staticmap']) && isset($dhcpifconf['enable']))
+ foreach ($dhcpifconf['staticmap'] as $host)
+ if ($host['ipaddr'] && $host['hostname'])
+ $hosts .= "{$host['ipaddr']} {$host['hostname']}.{$syscfg['domain']} {$host['hostname']}\n";
+ }
fwrite($fd, $hosts);
fclose($fd);
OpenPOWER on IntegriCloud