aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorsullrich <sullrich@pfsense.org>2009-12-10 16:59:41 -0500
committersullrich <sullrich@pfsense.org>2009-12-10 16:59:41 -0500
commit489ffb0376edee1927ed72400e6486dc0c619db6 (patch)
treeb864e9565900988391b5aa126c4b873921201a4e /config
parent5560227f3240e8a51865af9de05fd9ec17d961f1 (diff)
downloadpfsense-packages-489ffb0376edee1927ed72400e6486dc0c619db6.tar.gz
pfsense-packages-489ffb0376edee1927ed72400e6486dc0c619db6.tar.bz2
pfsense-packages-489ffb0376edee1927ed72400e6486dc0c619db6.zip
Do not foreach if item does not exist. Add minimal ports
Diffstat (limited to 'config')
-rw-r--r--config/portsentry/portsentry.inc18
1 files changed, 11 insertions, 7 deletions
diff --git a/config/portsentry/portsentry.inc b/config/portsentry/portsentry.inc
index 72ba51ab..b0a750d8 100644
--- a/config/portsentry/portsentry.inc
+++ b/config/portsentry/portsentry.inc
@@ -30,13 +30,17 @@ function portsentry_custom_php_install_command() {
$scantrigger = "0";
$isfirst = true;
- $ports = "";
- foreach($config['installedpackages']['portsentry']['config'][0]['row'] as $ps) {
- if(!$isfirst)
- $ports .= ",";
- if($ps['listenport'])
- $ports .= $ps['listenport'];
- $isfirst = false;
+
+ $ports = "1,11,15,110,111,143,540,635,1080,1524,2000,12345,12346,20034,32771,32772,32773,32774,49724,54320";
+ if($config['installedpackages']['portsentry']['config'][0]['row']) {
+ $ports = "";
+ foreach($config['installedpackages']['portsentry']['config'][0]['row'] as $ps) {
+ if(!$isfirst)
+ $ports .= ",";
+ if($ps['listenport'])
+ $ports .= $ps['listenport'];
+ $isfirst = false;
+ }
}
$tcp_ports = $ports;
$udp_ports = $ports;