Fix editing of forwarding rule

https://github.com/webmin/webmin/issues/2573
This commit is contained in:
Jamie Cameron
2025-10-14 21:26:51 -07:00
parent cb5f4e9d39
commit 3f8f9539a2
2 changed files with 5 additions and 2 deletions

View File

@@ -30,10 +30,13 @@ if (!$in{'new'}) {
$dstmode = 1;
($dstportlow, $dstporthigh) = ($1, $2);
}
else {
elsif ($dstports) {
$dstmode = 0;
$dstport = $dstports;
}
else {
$dstmode = 2;
}
}
else {
&ui_print_header(undef, $text{'forward_create'}, "");

View File

@@ -280,7 +280,7 @@ return $? ? $out : undef;
sub parse_firewalld_forward
{
my ($str) = @_;
my %w = map { split(/=/, $_) } split(/:/, $str);
my %w = map { split(/=/, $_, 2) } split(/:/, $str);
return ($w{'port'}, $w{'proto'}, $w{'toport'}, $w{'toaddr'});
}