Branch Coverage

blib/lib/IPTables/ChainMgr.pm
Criterion Covered Total %
branch 0 162 0.0


line true false branch
78 0 0 if $rv
105 0 0 unless $rv
112 0 0 unless $rv
115 0 0 if $self->{'_ipv6'}
123 0 0 if ($rulenum)
166 0 0 unless (my $rulenum = shift()) >= -1
186 0 0 if ($rule_position)
188 0 0 if (keys %$extended_hr) { }
193 0 0 if defined $extended_hr->{$key}
208 0 0 if ($rulenum == 0) { }
0 0 elsif ($rulenum < 0) { }
215 0 0 if ($rulenum > $num_chain_rules + 1)
216 0 0 if $num_chain_rules > 0
224 0 0 if (keys %$extended_hr) { }
244 0 0 if ($rv)
245 0 0 if $msg
247 0 0 if $idx_err
260 0 0 if ($IPTables::Parse::VERSION gt 1.1) { }
263 0 0 if ($normalized_src ne '')
269 0 0 if ($normalized_src ne '')
277 0 0 if (defined $self->{'parse_obj'}{'parse_keys'}{'regular'}{$key})
286 0 0 unless defined $extended_hr->{$key}
287 0 0 if ($extended_hr->{$key})
297 0 0 if (defined $parse_hr->{$key})
298 0 0 if $key =~ /s_?port$/ or $key =~ /d_?port$/
299 0 0 if (defined $parse_hr->{$key}{'use_quotes'} and $parse_hr->{$key}{'use_quotes'}) { }
312 0 0 if defined $extended_hr->{'protocol'}
315 0 0 if defined $extended_hr->{'s_port'}
318 0 0 if defined $extended_hr->{'d_port'}
320 0 0 if defined $extended_hr->{'mac_source'}
322 0 0 if defined $extended_hr->{'state'}
324 0 0 if defined $extended_hr->{'ctstate'}
328 0 0 if defined $extended_hr->{$key}
332 0 0 if (defined $extended_hr->{'to_ip'} and defined $extended_hr->{'to_port'})
366 0 0 if ($rulenum)
372 0 0 if (keys %$extended_hr)
375 0 0 if defined $extended_hr->{$key}
378 0 0 if (defined $extended_hr->{'to_ip'} and defined $extended_hr->{'to_port'})
404 0 0 if $verbose
406 0 0 if ($debug or $verbose)
415 0 0 if ($IPTables::Parse::VERSION gt '1.1')
428 0 0 if (keys %$extended_hr)
430 0 0 if $key eq 'normalize'
433 0 0 if ($key eq $supported_key)
438 0 0 unless ($found)
449 0 0 if defined $extended_hr->{'normalize'} and $extended_hr->{'normalize'}
451 0 0 if defined $extended_hr->{'normalize'} and $extended_hr->{'normalize'}
455 0 0 if ($rule_hr->{'target'} eq $target and $rule_hr->{'src'} eq $src and $rule_hr->{'dst'} eq $dst)
458 0 0 if (keys %$extended_hr) { }
461 0 0 if (defined $extended_hr->{$key})
462 0 0 if (defined $rule_hr->{$key}) { }
463 0 0 if ($key eq 'state' or $key eq 'ctstate') { }
0 0 elsif ($key eq 'mac_source') { }
467 0 0 unless (&state_compare($extended_hr->{$key}, $rule_hr->{$key}))
474 0 0 unless (lc $extended_hr->{$key} eq lc $rule_hr->{$key})
480 0 0 unless ($extended_hr->{$key} eq $rule_hr->{$key})
492 0 0 if $found
494 0 0 if ($rule_hr->{'protocol'} eq 'all')
495 0 0 if ($target eq 'LOG' or $target eq 'ULOG') { }
0 0 elsif (not $rule_hr->{'extended'}) { }
516 0 0 if ($IPTables::Parse::VERSION gt 1.1) { }
522 0 0 if (defined $p_hr->{'regex'} and $p_hr->{'regex'})
525 0 0 if (defined $p_hr->{'ipt_match'} and $p_hr->{'ipt_match'})
534 0 0 if (defined $p_hr->{'regex'} and $p_hr->{'regex'})
537 0 0 if (defined $p_hr->{'ipt_match'} and $p_hr->{'ipt_match'})
561 0 0 if ($state1 eq $state2)
566 0 0 unless $found
572 0 0 if ($state2 eq $state1)
577 0 0 unless $found
592 0 0 if ($net =~ m[/] and $net =~ /$ipv4_re/ or $net =~ /:/)
593 0 0 if ($net =~ /:/) { }
594 0 0 unless my $n = 'NetAddr::IP'->new6($net)
599 0 0 unless my $n = 'NetAddr::IP'->new($net)
616 0 0 if ($from_chain eq $to_chain)
622 0 0 if $self->{'_ipv6'}
630 0 0 if $rulenum <= 0
631 0 0 if ($rulenum > $num_chain_rules + 1)
632 0 0 if $num_chain_rules > 0
637 0 0 if $rulenum == 0
639 0 0 if ($rule_position)
648 0 0 if $idx_err