diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2006-02-05 20:37:01 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2006-02-05 20:37:01 +0000 |
commit | e428c94d112e891b3de4d2eee678f3a1a49e3f36 (patch) | |
tree | d21dc7d289c7407745881c2f6bdfd4b864c3cd56 /etc | |
parent | 5d98aeb1c8da7fb394275dc89402aa793e5e3acf (diff) | |
download | pfsense-e428c94d112e891b3de4d2eee678f3a1a49e3f36.zip pfsense-e428c94d112e891b3de4d2eee678f3a1a49e3f36.tar.gz |
Do not allow blank nameserver entries
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/system.inc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/etc/inc/system.inc b/etc/inc/system.inc index 9a310f1..3fd47a9 100644 --- a/etc/inc/system.inc +++ b/etc/inc/system.inc @@ -55,15 +55,18 @@ function system_resolvconf_generate($dynupdate = false) { /* get dynamically assigned DNS servers (if any) */ $ns = get_nameservers(); foreach($ns as $nameserver) { - $resolvconf .= "nameserver $nameserver\n"; - $havedns = true; + if($nameserver) { + $resolvconf .= "nameserver $nameserver\n"; + $havedns = true; + } } } if (!$havedns && is_array($syscfg['dnsserver'])) { foreach ($syscfg['dnsserver'] as $ns) { - if ($ns) + if ($ns) { $resolvconf .= "nameserver $ns\n"; - $havedns = true; + $havedns = true; + } } } |