Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
Open sidebar
lolo888
ISPConfig 3
Commits
7d5fa885
Commit
7d5fa885
authored
Jul 08, 2009
by
tbrehm
Browse files
Fixed: FS#748 - ispconfig vs firewall port range
parent
0b725341
Changes
1
Hide whitespace changes
Inline
Side-by-side
server/plugins-available/firewall_plugin.inc.php
View file @
7d5fa885
...
...
@@ -79,8 +79,13 @@ class firewall_plugin {
$ports
=
explode
(
','
,
$data
[
"new"
][
"tcp_port"
]);
if
(
is_array
(
$ports
))
{
foreach
(
$ports
as
$p
)
{
$p_int
=
intval
(
$p
);
if
(
$p_int
>
0
)
$tcp_ports
.
=
$p_int
.
' '
;
if
(
strstr
(
$p
,
':'
))
{
$p_parts
=
explode
(
':'
,
$p
);
$p_clean
=
intval
(
$p_parts
[
0
])
.
':'
.
intval
(
$p_parts
[
1
]);
}
else
{
$p_clean
=
intval
(
$p
);
}
if
(
$p_int
>
0
)
$tcp_ports
.
=
$p_clean
.
' '
;
}
}
$tcp_ports
=
trim
(
$tcp_ports
);
...
...
@@ -88,8 +93,13 @@ class firewall_plugin {
$ports
=
explode
(
','
,
$data
[
"new"
][
"udp_port"
]);
if
(
is_array
(
$ports
))
{
foreach
(
$ports
as
$p
)
{
$p_int
=
intval
(
$p
);
if
(
$p_int
>
0
)
$udp_ports
.
=
$p_int
.
' '
;
if
(
strstr
(
$p
,
':'
))
{
$p_parts
=
explode
(
':'
,
$p
);
$p_clean
=
intval
(
$p_parts
[
0
])
.
':'
.
intval
(
$p_parts
[
1
]);
}
else
{
$p_clean
=
intval
(
$p
);
}
if
(
$p_int
>
0
)
$udp_ports
.
=
$p_clean
.
' '
;
}
}
$udp_ports
=
trim
(
$udp_ports
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment