Skip to content
Snippets Groups Projects
Commit 52901cd4 authored by Gerhard Gonter's avatar Gerhard Gonter :speech_balloon:
Browse files

missing close(UFW) caused ufw process to hang as zombie; added...

missing close(UFW) caused ufw process to hang as zombie; added get_ipv4_cidr_hash; parsing comments in ufw listing
parent df29c3e5
No related branches found
No related tags found
No related merge requests found
......@@ -106,6 +106,7 @@ sub status
elsif ($rst == 3)
{
if ($t eq '(log)') { $rule{log}= 1; }
elsif ($t eq '#') { $rule{comment}= join(' ', @t); @t= (); }
else { push (@{$rule{junk}}, $t) }
}
}
......@@ -117,6 +118,7 @@ sub status
}
}
}
close(UFW);
$self;
}
......@@ -142,6 +144,12 @@ sub get_rule
return ($self->{rules}->[$number-1]);
}
sub get_ipv4_cidr_hash
{
my $self= shift;
return $self->{src_ipv4_cidr};
}
sub block
{
my $self= shift;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment