Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

minor bug fix for uninitialized variable usage in ICMP6 invalid type/…

…code detection
  • Loading branch information...
commit 760e02b3c2c796e4856ec1338684c84679a15580 1 parent 4e05985
@mrash authored
Showing with 10 additions and 4 deletions.
  1. +10 −4 psad
View
14 psad
@@ -5419,7 +5419,7 @@ sub scan_logr() {
print $fh ' Multi-Protocol';
}
if (defined $auto_assigned_msg{$src}) {
- printf $fh ' Auto-assigned';
+ print $fh ' Auto-assigned';
delete $auto_assigned_msg{$src};
}
print $fh "\n\n";
@@ -5837,9 +5837,15 @@ sub scan_logr_signatures() {
for my $chain (keys %{$hr->{'invalid_code'}->{$type}->{$code}}) {
my $pkts = $hr->{'invalid_code'}->
{$type}->{$code}->{$chain}->{'pkts'};
- print $email_fh qq| Invalid ICMP code "$code" for ICMP |,
- qq|"$valid_icmp_types{$type}{'text'}" packet\n|,
- " chain=$chain packets=$pkts\n";
+ if ($proto eq 'icmp') {
+ print $email_fh qq| Invalid ICMP code "$code" for ICMP |,
+ qq|"$valid_icmp_types{$type}{'text'}" packet\n|,
+ " chain=$chain packets=$pkts\n";
+ } elsif ($proto eq 'icmp6') {
+ print $email_fh qq| Invalid ICMP code "$code" for ICMP |,
+ qq|"$valid_icmp6_types{$type}{'text'}" packet\n|,
+ " chain=$chain packets=$pkts\n";
+ }
}
}
}

0 comments on commit 760e02b

Please sign in to comment.
Something went wrong with that request. Please try again.