# (2) Added rules based paging (Stephen Johnson Nov 14, 1998)
# (3) Added checks against Acks and downtime (Stephen Johnson Mar 17, 1999)
#
-# $Id: spong-message.pl,v 1.16 2000/11/30 21:27:40 sljohnson Exp $
+# $Id: spong-message.pl,v 1.17 2000/12/15 21:55:04 sljohnson Exp $
use lib "@@LIBDIR@@";
if ( defined $rule->{'exclude_hosts'} ) {
my($e);
foreach $e ( @{$rule->{'exclude_hosts'}} ) {
- $e = '^' . $e;
- if ( $host =~ /$e/ ) {
+ if ( $host =~ /^$e/ ) {
&debug("Match on exclude host $e on rule $c, going to next rule");
next RULE;
}
}
if ( defined $rule->{'exclude_services'} ) {
foreach $e ( @{$rule->{'exclude_services'}} ) {
- $e = '^' . $e;
- if ( $service =~ /$e/ ) {
+ if ( $service =~ /^$e/ ) {
&debug("Match on exclude service $e on rule $c, going to next rule");
next RULE;
}
} else {
$m = 0;
foreach $e ( @{$rule->{'hosts'}} ) {
- $e = '^' . $e;
- if ( $host =~ /$e/ ) { $m = 1; last; }
+ if ( $host =~ /^$e/ ) { $m = 1; last; }
}
if (! $m) {
&debug("No match for host $host on rule $c, checking host groups");
} else {
$m = 0;
foreach $e ( @{$rule->{'services'}} ) {
- $e = '^' . $e;
- if ( $service =~ /$e/ ) { $m = 1; last; }
+ if ( $service =~ /^$e/ ) { $m = 1; last; }
}
if (! $m) {
&debug("No match for service $service on rule $c");