diff options
author | bmeeks8 <bmeeks8@bellsouth.net> | 2013-09-29 10:06:37 -0400 |
---|---|---|
committer | bmeeks8 <bmeeks8@bellsouth.net> | 2013-09-29 10:06:37 -0400 |
commit | 83f0abac54106e178465d848e2009a66d1ba8735 (patch) | |
tree | 84834afa1e4ff195636b560fb45198d5d24a45c1 /config/snort/snort.inc | |
parent | 2019b75b12c2355470dc854cc4a8a8aed2588ed7 (diff) | |
download | pfsense-packages-83f0abac54106e178465d848e2009a66d1ba8735.tar.gz pfsense-packages-83f0abac54106e178465d848e2009a66d1ba8735.tar.bz2 pfsense-packages-83f0abac54106e178465d848e2009a66d1ba8735.zip |
Fix errors in new snort_unpack_alias() function
Diffstat (limited to 'config/snort/snort.inc')
-rwxr-xr-x | config/snort/snort.inc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/config/snort/snort.inc b/config/snort/snort.inc index d69f6237..e120b942 100755 --- a/config/snort/snort.inc +++ b/config/snort/snort.inc @@ -123,7 +123,7 @@ function snort_unpack_alias($alias) { /* recursive calls to this function. */ /* */ /* Fully-qualified-domain-name (FQDN) aliases */ - /* are detected and resolved via a pfctl() call. */ + /* are detected and resolved via DNS. */ /**************************************************/ global $config; @@ -141,9 +141,11 @@ function snort_unpack_alias($alias) { $value .= $a . " "; elseif (is_hostname($a)) { // Found a FQDN value for this Alias, so resolve it - $entries = array(); - exec("/sbin/pfctl -t " . escapeshellarg($alias) . " -T show", $entries); - $value .= trim(implode(" ", $entries)); + $entries = gethostbynamel($a); + if ($entries !== FALSE) + $value .= trim(implode(" ", $entries)) . " "; + else + log_error(gettext("[Snort] Failed to resolve FQDN '{$a}' in Alias '{$alias}'...")); } else continue; |