From 6ce392b08ebf8cbd4787f93ad7b581e9433821a2 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Sat, 26 Jan 2013 12:18:17 -0800 Subject: [PATCH] Correct handling of handle_first_entry() to avoid runaway recursion. Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Config.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Shorewall/Perl/Shorewall/Config.pm b/Shorewall/Perl/Shorewall/Config.pm index 6107c11b5..498a02e36 100644 --- a/Shorewall/Perl/Shorewall/Config.pm +++ b/Shorewall/Perl/Shorewall/Config.pm @@ -2983,8 +2983,11 @@ sub handle_first_entry() { # $first_entry can contain either a function reference or a message. If it # contains a reference, call the function -- otherwise issue the message # - reftype( $first_entry ) ? $first_entry->() : progress_message2( $first_entry ); + my $entry = $first_entry; + $first_entry = 0; + + reftype( $entry ) ? $entry->() : progress_message2( $entry ); } #