From 4359f15e69848ad6ee7764d10bc3c6aadc36e6c6 Mon Sep 17 00:00:00 2001
From: Andrew Ruthven <andrew@etc.gen.nz>
Date: Fri, 18 Mar 2011 22:34:54 +1300
Subject: [PATCH] The $re changes everytime through the loops, so we can't
 optimise it.

This bug meant that only the first regex in the INC and EXCL lists
was ever used.
---
 contrib/plugins/spong-server/data_sendmsg | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/contrib/plugins/spong-server/data_sendmsg b/contrib/plugins/spong-server/data_sendmsg
index 9f74ffb..1d57aae 100644
--- a/contrib/plugins/spong-server/data_sendmsg
+++ b/contrib/plugins/spong-server/data_sendmsg
@@ -38,13 +38,13 @@ sub data_sendmsg {
 
    # Check the list of hosts to exclude
    foreach my $re (@SENDMSG_EXCL_HOSTS) {
-      if ( $host =~ /$re/o ) { return; }  # If we get a hit, return
+      if ( $host =~ /$re/ ) { return; }  # If we get a hit, return
    }
 
    # Check the lists of hosts to include
    my $hit=0;
    foreach my $re (@SENDMSG_INC_HOSTS) {
-      if ( $host =~ /$re/o ) { $hit=1; last; } # If we get a hit, set flag
+      if ( $host =~ /$re/ ) { $hit=1; last; } # If we get a hit, set flag
    }
    return unless $hit;  # Return unless we got a hit
 
-- 
2.30.2