diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2007-09-25 17:33:58 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2007-09-25 17:33:58 +0000 |
commit | b4c7cf6c89b9b58fce973e786f2e21784d3a86cc (patch) | |
tree | 61fea877ffd4a9597537c6d65e71f8e67a077d38 /etc/inc | |
parent | 60d48253aa7661d926f27afbc93d2c9dabce960b (diff) | |
download | pfsense-b4c7cf6c89b9b58fce973e786f2e21784d3a86cc.zip pfsense-b4c7cf6c89b9b58fce973e786f2e21784d3a86cc.tar.gz |
Only record entry if it resolves to an ip address
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/pfsense-utils.inc | 3 |
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); } |