line |
true |
false |
branch |
108
|
0 |
0 |
if exists $args{'file'} |
109
|
0 |
0 |
if exists $args{'autosave'} |
111
|
0 |
0 |
if ($self->file and -r $self->file) |
131
|
0 |
0 |
unless $$args{'ip'} or $$args{'mac'} |
134
|
0 |
0 |
unless $self->test_acl($$args{'ip'}) |
137
|
0 |
0 |
if (my $int = $self->has_interface($args)) |
151
|
0 |
0 |
unless (defined $$args{'mask'}) |
156
|
0 |
0 |
if ($$args{'ip'} and $$args{'mask'}) { } |
160
|
0 |
0 |
unless ($net = $self->has_subnet({'ip', $$args{'ip'}, 'mask', $$args{'mask'}})) |
173
|
0 |
0 |
if $$args{'ip'} |
174
|
0 |
0 |
if $$args{'mac'} |
177
|
0 |
0 |
if $index == 0 |
222
|
0 |
0 |
unless $$args{'ip'} or $$args{'mac'} |
224
|
0 |
0 |
if (my $interface_index = $self->has_interface($args)) |
233
|
0 |
0 |
if exists $$last_interface{'ip'} |
234
|
0 |
0 |
if exists $$last_interface{'mac'} |
237
|
0 |
0 |
if exists $$last_interface{'subnet'} |
238
|
0 |
0 |
if exists $$last_interface{'gateway'} |
241
|
0 |
0 |
if $last_index == $interface_index |
249
|
0 |
0 |
if exists $$cut_interface{'ip'} |
250
|
0 |
0 |
if exists $$cut_interface{'mac'} |
253
|
0 |
0 |
if exists $$cut_interface{'subnet'} |
254
|
0 |
0 |
if exists $$cut_interface{'gateway'} |
258
|
0 |
0 |
if $$last_interface{'ip'} |
259
|
0 |
0 |
if $$last_interface{'mac'} |
262
|
0 |
0 |
if exists $$last_interface{'subnet'} |
263
|
0 |
0 |
if exists $$last_interface{'gateway'} |
319
|
0 |
0 |
if exists $$self{'interfaces'}[$interface] |
335
|
0 |
0 |
if (exists $$args{'ip'} and exists $$self{'ip2int'}{$$args{'ip'}}) |
337
|
0 |
0 |
if $i == 0 |
340
|
0 |
0 |
if (exists $$args{'mac'} and exists $$self{'mac2int'}{$$args{'mac'}}) |
342
|
0 |
0 |
if $i == 0 |
383
|
0 |
0 |
if $newint{'ip'} |
384
|
0 |
0 |
if $newint{'mac'} |
388
|
0 |
0 |
unless $v |
389
|
0 |
0 |
unless $k |
390
|
0 |
0 |
if (exists $newint{$k}) { } |
391
|
0 |
0 |
if ($v and $newint{$k} ne $v) { } |
409
|
0 |
0 |
if $newint{'ip'} |
410
|
0 |
0 |
if $newint{'mac'} |
412
|
0 |
0 |
if $interface == 0 |
427
|
0 |
0 |
unless $$args{'ip'} and $$args{'mask'} ne '' |
430
|
0 |
0 |
unless $self->test_acl($$args{'ip'}) |
434
|
0 |
0 |
unless ($index = $self->has_subnet({'ip', $$args{'ip'}, 'mask', $$args{'mask'}})) |
449
|
0 |
0 |
if $index == 0 |
464
|
0 |
0 |
unless $$args{'ip'} and $$args{'mask'} ne '' |
473
|
0 |
0 |
if ($$self{'subnets'}[$i]{'ip'} eq $$args{'ip'} and $$self{'subnets'}[$i]{'mask'} eq $$args{'mask'}) |
475
|
0 |
0 |
if $i == 0 |
498
|
0 |
0 |
unless $$args{'ip'} |
501
|
0 |
0 |
unless $self->test_acl($$args{'ip'}) |
504
|
0 |
0 |
if ($gwindex = $self->has_gateway($args)) { } |
511
|
0 |
0 |
if ($interfaceindex = $self->has_interface($args)) { } |
522
|
0 |
0 |
if $gwindex == 0 |
537
|
0 |
0 |
unless $$args{'ip'} |
541
|
0 |
0 |
if (grep {$$self{'interfaces'}[$_]{'ip'} eq $$args{'ip'};} @{$$self{'gateways'}[$i]{'interfaces'};}) |
542
|
0 |
0 |
if $i == 0 |
561
|
0 |
0 |
if (exists $$args{'ip'} and $$args{'ip'}) |
562
|
0 |
0 |
unless $$args{'ip'} =~ /^\d+\.\d+\.\d+\.\d+/ |
565
|
0 |
0 |
if (exists $$args{'mask'} and $$args{'mask'} ne '') |
566
|
0 |
0 |
unless $$args{'mask'} =~ /^(?:\d+|\d+\.\d+\.\d+\.\d+)$/ |
570
|
0 |
0 |
if (exists $$args{'mac'} and $$args{'mac'}) |
571
|
0 |
0 |
unless $$args{'mac'} =~ /^(?:[0-9A-F]{2}:){5}[0-9A-F]{2}/ |
591
|
0 |
0 |
if (exists $$int{'subnet'}) |
592
|
0 |
0 |
unless (grep {$_ == $i;} @{$$self{'subnets'}[$$int{'subnet'}]{'interfaces'};}) |
602
|
0 |
0 |
if (exists $$net{'interfaces'}) |
604
|
0 |
0 |
unless ($$self{'interfaces'}[$int]{'subnet'} eq $i) |
617
|
0 |
0 |
if ($mask =~ /^\d+\.\d+\.\d+\.\d+/) |
628
|
0 |
0 |
if ($mask =~ /^\d+$/) |
640
|
0 |
0 |
if ($ip =~ /^\d+\.\d+\.\d+\.\d+/) |
684
|
0 |
0 |
if (@_) { } |
|
0 |
0 |
elsif ($self->file) { } |
715
|
0 |
0 |
if (@_) { } |
|
0 |
0 |
elsif ($self->file) { } |
737
|
0 |
0 |
if @_ |
753
|
0 |
0 |
if @_ |
831
|
0 |
0 |
if ($1 eq 'allow') { } |
834
|
0 |
0 |
if $self->acl_match($ip, $2) |
840
|
0 |
0 |
if $self->acl_match($ip, $2) |
870
|
0 |
0 |
if ($1 eq '0.0.0.0' and $2 eq 0) |
884
|
0 |
0 |
if ($bits) { } |
887
|
0 |
0 |
if $maskedIP == $mainIP >> $bits |
892
|
0 |
0 |
if $maskedIP == $mainIP |
926
|
0 |
0 |
unless $AorD =~ /(allow|deny)/ |
930
|
0 |
0 |
unless $a =~ m[^\d+\.\d+\.\d+\.\d+(?:/\d+)?] |
967
|
0 |
0 |
if ($bits eq 0) { } |
|
0 |
0 |
elsif ($bits eq 1) { } |
|
0 |
0 |
elsif ($bits eq 2) { } |
1005
|
0 |
0 |
if $self->autosave |