diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2006-10-28 00:44:43 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2006-10-28 00:44:43 +0000 |
commit | 7e6bec1051309aac84212d0f516b232bdef78068 (patch) | |
tree | 23287ee970c6f9727167e91bafc780e6599c0b9e | |
parent | ba1f255a2b0ff256c2994da0ee6835374bb4ec26 (diff) | |
download | pfsense-packages-7e6bec1051309aac84212d0f516b232bdef78068.tar.gz pfsense-packages-7e6bec1051309aac84212d0f516b232bdef78068.tar.bz2 pfsense-packages-7e6bec1051309aac84212d0f516b232bdef78068.zip |
When no interface is selected, do not error out.
Ticket #1155
-rw-r--r-- | packages/snort/snort.inc | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/packages/snort/snort.inc b/packages/snort/snort.inc index 80ac2200..8b42db29 100644 --- a/packages/snort/snort.inc +++ b/packages/snort/snort.inc @@ -76,16 +76,17 @@ function sync_package_snort() { $iflist = array("lan" => "LAN"); for ($i = 1; isset($config['interfaces']['opt' . $i]); $i++) $iflist['opt' . $i] = "opt{$i}"; - foreach($_POST['iface_array'] as $iface) { - $if = convert_friendly_interface_to_real_interface_name($iface); - if($config['interfaces'][$iface]['ipaddr'] == "pppoe") - $if = "ng0"; - if($if) { - $ifaces_final .= " -i " . $if; - $first = 1; + if($_POST['iface_array']) { + foreach($_POST['iface_array'] as $iface) { + $if = convert_friendly_interface_to_real_interface_name($iface); + if($config['interfaces'][$iface]['ipaddr'] == "pppoe") + $if = "ng0"; + if($if) { + $ifaces_final .= " -i " . $if; + $first = 1; + } } } - /* create log directory */ $start = "/bin/mkdir -p /var/log/snort"; |