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
185 0 0 if ($rule_position)
187 0 0 if (keys %$extended_hr) { }
192 0 0 if defined $extended_hr->{$key}
207 0 0 if ($rulenum == 0) { }
0 0 elsif ($rulenum < 0) { }
214 0 0 if ($rulenum > $num_chain_rules + 1)
215 0 0 if $num_chain_rules > 0
223 0 0 if (keys %$extended_hr) { }
243 0 0 if ($rv)
244 0 0 if $msg
246 0 0 if $idx_err
259 0 0 if ($IPTables::Parse::VERSION > 1.1) { }
262 0 0 if ($normalized_src ne '')
268 0 0 if ($normalized_src ne '')
276 0 0 if (defined $self->{'parse_obj'}{'parse_keys'}{'regular'}{$key})
285 0 0 unless defined $extended_hr->{$key}
286 0 0 if ($extended_hr->{$key})
296 0 0 if (defined $parse_hr->{$key})
297 0 0 if $key =~ /s_?port$/ or $key =~ /d_?port$/
298 0 0 if (defined $parse_hr->{$key}{'use_quotes'} and $parse_hr->{$key}{'use_quotes'}) { }
311 0 0 if defined $extended_hr->{'protocol'}
314 0 0 if defined $extended_hr->{'s_port'}
317 0 0 if defined $extended_hr->{'d_port'}
319 0 0 if defined $extended_hr->{'mac_source'}
321 0 0 if defined $extended_hr->{'state'}
323 0 0 if defined $extended_hr->{'ctstate'}
327 0 0 if defined $extended_hr->{$key}
331 0 0 if (defined $extended_hr->{'to_ip'} and defined $extended_hr->{'to_port'})
365 0 0 if ($rulenum)
371 0 0 if (keys %$extended_hr)
374 0 0 if defined $extended_hr->{$key}
377 0 0 if (defined $extended_hr->{'to_ip'} and defined $extended_hr->{'to_port'})
403 0 0 if $verbose
405 0 0 if ($debug or $verbose)
414 0 0 if ($IPTables::Parse::VERSION gt '1.1')
427 0 0 if (keys %$extended_hr)
429 0 0 if $key eq 'normalize'
432 0 0 if ($key eq $supported_key)
437 0 0 unless ($found)
448 0 0 if defined $extended_hr->{'normalize'} and $extended_hr->{'normalize'}
450 0 0 if defined $extended_hr->{'normalize'} and $extended_hr->{'normalize'}
454 0 0 if ($rule_hr->{'target'} eq $target and $rule_hr->{'src'} eq $src and $rule_hr->{'dst'} eq $dst)
457 0 0 if (keys %$extended_hr) { }
460 0 0 if (defined $extended_hr->{$key})
461 0 0 if (defined $rule_hr->{$key}) { }
462 0 0 if ($key eq 'state' or $key eq 'ctstate') { }
0 0 elsif ($key eq 'mac_source') { }
466 0 0 unless (&state_compare($extended_hr->{$key}, $rule_hr->{$key}))
473 0 0 unless (lc $extended_hr->{$key} eq lc $rule_hr->{$key})
479 0 0 unless ($extended_hr->{$key} eq $rule_hr->{$key})
491 0 0 if $found
493 0 0 if ($rule_hr->{'protocol'} eq 'all')
494 0 0 if ($target eq 'LOG' or $target eq 'ULOG') { }
0 0 elsif (not $rule_hr->{'extended'}) { }
515 0 0 if ($IPTables::Parse::VERSION > 1.1) { }
521 0 0 if (defined $p_hr->{'regex'} and $p_hr->{'regex'})
524 0 0 if (defined $p_hr->{'ipt_match'} and $p_hr->{'ipt_match'})
533 0 0 if (defined $p_hr->{'regex'} and $p_hr->{'regex'})
536 0 0 if (defined $p_hr->{'ipt_match'} and $p_hr->{'ipt_match'})
560 0 0 if ($state1 eq $state2)
565 0 0 unless $found
571 0 0 if ($state2 eq $state1)
576 0 0 unless $found
591 0 0 if ($net =~ m[/] and $net =~ /$ipv4_re/ or $net =~ /:/)
592 0 0 if ($net =~ /:/) { }
593 0 0 unless my $n = 'NetAddr::IP'->new6($net)
598 0 0 unless my $n = 'NetAddr::IP'->new($net)
615 0 0 if ($from_chain eq $to_chain)
621 0 0 if $self->{'_ipv6'}
629 0 0 if $rulenum <= 0
630 0 0 if ($rulenum > $num_chain_rules + 1)
631 0 0 if $num_chain_rules > 0
636 0 0 if $rulenum == 0
638 0 0 if ($rule_position)
647 0 0 if $idx_err