diff options
author | Ermal <eri@pfsense.org> | 2011-01-18 21:13:30 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2011-01-18 21:13:30 +0000 |
commit | 85e3f445b0587d50504e2526208936981476a38f (patch) | |
tree | e2019a6688c02047adcf6d288f79feca93aebb2b | |
parent | ba4f6e1df684ab22d280fef9d71aa3ffca9c988a (diff) | |
download | pfsense-85e3f445b0587d50504e2526208936981476a38f.zip pfsense-85e3f445b0587d50504e2526208936981476a38f.tar.gz |
Do not put a config entry for dhcpd if we cannot determine the subnet address. Reported-by: http://forum.pfsense.org/index.php/topic,32303.0.html
-rw-r--r-- | etc/inc/services.inc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/etc/inc/services.inc b/etc/inc/services.inc index 166390b..74c923c 100644 --- a/etc/inc/services.inc +++ b/etc/inc/services.inc @@ -228,6 +228,9 @@ EOPP; $subnet = gen_subnet($ifcfgip, $ifcfgsn); $subnetmask = gen_subnet_mask($ifcfgsn); + if (!is_ipaddr($subnet)) + continue; + if($is_olsr_enabled == true) if($dhcpifconf['netmask']) $subnetmask = gen_subnet_mask($dhcpifconf['netmask']); @@ -257,7 +260,7 @@ EOPP; $dnscfg .= " option domain-name-servers " . join(",", $syscfg['dnsserver']) . ";"; } - $dhcpdconf .= "subnet $subnet netmask $subnetmask {\n"; + $dhcpdconf .= "subnet {$subnet} netmask {$subnetmask} {\n"; $dhcpdconf .= " pool {\n"; /* is failover dns setup? */ @@ -1378,4 +1381,4 @@ function install_cron_job($command, $active=false, $minute="0", $hour="*", $mont configure_cron(); } -?>
\ No newline at end of file +?> |