diff options
author | Renato Botelho <garga@FreeBSD.org> | 2014-09-06 10:28:55 -0300 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2014-09-06 10:28:55 -0300 |
commit | 81ff18ddc45fff6018e7e052c865aaa4f85cfe14 (patch) | |
tree | 724108d95af058335d078040aca6ec6aeaeb1746 /config/suricata/suricata_list_view.php | |
parent | 200641d3d2e8dcaf66bb5c141def1b4ad109df3b (diff) | |
parent | ad7e3dca2b915b9f27ba01bade962305a0dd34bb (diff) | |
download | pfsense-packages-81ff18ddc45fff6018e7e052c865aaa4f85cfe14.tar.gz pfsense-packages-81ff18ddc45fff6018e7e052c865aaa4f85cfe14.tar.bz2 pfsense-packages-81ff18ddc45fff6018e7e052c865aaa4f85cfe14.zip |
Merge pull request #696 from bmeeks8/suricata-2.0.3-v2.0
Diffstat (limited to 'config/suricata/suricata_list_view.php')
-rw-r--r-- | config/suricata/suricata_list_view.php | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/config/suricata/suricata_list_view.php b/config/suricata/suricata_list_view.php index 722bf47a..ec335abd 100644 --- a/config/suricata/suricata_list_view.php +++ b/config/suricata/suricata_list_view.php @@ -42,7 +42,7 @@ $type = htmlspecialchars($_GET['type']); $title = "List"; if (isset($id) && isset($wlist)) { - $a_rule = $config['installedpackages']['suricataglobal']['rule'][$id]; + $a_rule = $config['installedpackages']['suricata']['rule'][$id]; if ($type == "homenet") { $list = suricata_build_list($a_rule, $wlist); $contents = implode("\n", $list); @@ -58,6 +58,20 @@ if (isset($id) && isset($wlist)) { $contents = str_replace("\r", "", base64_decode($list['suppresspassthru'])); $title = "Suppress List"; } + elseif ($type == "externalnet") { + if ($wlist == "default") { + $list = suricata_build_list($a_rule, $a_rule['homelistname']); + $contents = ""; + foreach ($list as $ip) + $contents .= "!{$ip}\n"; + $contents = trim($contents, "\n"); + } + else { + $list = suricata_build_list($a_rule, $wlist, false, true); + $contents = implode("\n", $list); + } + $title = "EXTERNAL_NET"; + } else $contents = gettext("\n\nERROR -- Requested List Type entity is not valid!"); } |