summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-09-25 17:33:58 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-09-25 17:33:58 +0000
commitb4c7cf6c89b9b58fce973e786f2e21784d3a86cc (patch)
tree61fea877ffd4a9597537c6d65e71f8e67a077d38 /etc
parent60d48253aa7661d926f27afbc93d2c9dabce960b (diff)
downloadpfsense-b4c7cf6c89b9b58fce973e786f2e21784d3a86cc.zip
pfsense-b4c7cf6c89b9b58fce973e786f2e21784d3a86cc.tar.gz
Only record entry if it resolves to an ip address
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/pfsense-utils.inc3
1 files changed, 2 insertions, 1 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 5b0eeef..88cee69 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -3692,7 +3692,8 @@ function add_hostname_to_watch($hostname) {
$dnshost = gethostbyname($hostname);
if(!is_dir("/var/db/dnscache"))
mkdir("/var/db/dnscache");
- exec("echo $dnshost > /var/db/dnscache/$hostname");
+ if($dnshost)
+ exec("echo $dnshost > /var/db/dnscache/$hostname");
}
error_reporting(1);
}
OpenPOWER on IntegriCloud