projects
/
webmin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2ffb388
)
Don't modify existing rules
author
Jamie Cameron
<jcameron@webmin.com>
Wed, 29 Jun 2011 19:08:26 +0000
(15:08 -0400)
committer
Jamie Cameron
<jcameron@webmin.com>
Wed, 29 Jun 2011 19:08:26 +0000
(15:08 -0400)
firewall/open-ports.pl
patch
|
blob
|
history
diff --git
a/firewall/open-ports.pl
b/firewall/open-ports.pl
index
82dc74a
..
4cb5f06
100755
(executable)
--- a/
firewall/open-ports.pl
+++ b/
firewall/open-ports.pl
@@
-67,8
+67,9
@@
PORT: foreach $p (@ARGV) {
print STDERR "Checking for port $p ..\n";
foreach $r (@{$filter->{'rules'}}) {
if ($r->{'chain'} eq 'INPUT' &&
- $r->{'j'}->[1] eq 'ACCEPT' &&
- $r->{'p'}->[0] eq '' && $r->{'p'}->[1] eq 'tcp') {
+ $r->{'j'} && $r->{'j'}->[1] eq 'ACCEPT' &&
+ $r->{'p'} && $r->{'p'}->[0] eq '' &&
+ $r->{'p'}->[1] eq 'tcp') {
# Found tcp rule .. check ports
@rports = ( );
if ($r->{'dports'} && $r->{'dports'}->[0] eq '') {