Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Ravada-Mirror
Commits
b083467a
Commit
b083467a
authored
Sep 08, 2021
by
Francesc Guasch
Browse files
refactor(backend): avoid duplicated commands to same domain
concurrent start and open_iptables could mess with iptables
parent
1ecdcbca
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/Ravada.pm
View file @
b083467a
...
...
@@ -3157,7 +3157,7 @@ sub process_requests {
my
$domain
=
'';
$domain
=
$id_domain
if
$id_domain
;
$domain
.=
(
$req
->
defined_arg
('
name
')
or
'');
next if $duplicated{$
req->command.":$
domain
"
}++;
next
if
$duplicated
{
$domain
}
++
;
push
@reqs
,(
$req
);
}
$sth
->
finish
;
...
...
@@ -4882,7 +4882,11 @@ sub _check_duplicated_iptable($self, $request = undef ) {
my
$rule
=
join
("
",
map
{
$_
.
"
"
.
$args
{
$_
}
}
sort
keys
%args
);
if
(
$dupe
{
$rule
})
{
warn "clean duplicated iptables rule ".Dumper($line);
my
%args2
;
while
(
my
(
$key
,
$value
)
=
each
%args
)
{
$args2
{"
-
$key
"}
=
$value
;
}
warn
"
clean duplicated iptables rule
"
.
join
("
",
%args2
)
.
"
\n
";
$self
->
_delete_iptables_rule
(
$vm
,'
filter
',
\
%args
);
}
$dupe
{
$rule
}
++
;
...
...
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