From 5793246d7c7ed8b3f87d13ba25b41c960fbbb9f5 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Sun, 13 Sep 2009 09:01:34 -0700 Subject: [PATCH] Make processing of original dest in Format-1 macros more obvious --- Shorewall/Perl/Shorewall/Actions.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Actions.pm b/Shorewall/Perl/Shorewall/Actions.pm index 477a17995..08d898835 100644 --- a/Shorewall/Perl/Shorewall/Actions.pm +++ b/Shorewall/Perl/Shorewall/Actions.pm @@ -638,7 +638,8 @@ sub process_macro3( $$$$$$$$$$$ ) { my ( $mtarget, $msource, $mdest, $mproto, $mports, $msports, $morigdest, $mrate, $muser ); if ( $format == 1 ) { - ( $mtarget, $msource, $mdest, $mproto, $mports, $msports, $mrate, $muser, $morigdest ) = split_line1 1, 9, 'macro file', $macro_commands; + ( $mtarget, $msource, $mdest, $mproto, $mports, $msports, $mrate, $muser ) = split_line1 1, 'macro file', $macro_commands; + $morigdest = '-'; } else { ( $mtarget, $msource, $mdest, $mproto, $mports, $msports, $morigdest, $mrate, $muser ) = split_line1 1, 9, 'macro file', $macro_commands; } @@ -654,8 +655,6 @@ sub process_macro3( $$$$$$$$$$$ ) { next; } - fatal_error "Invalid macro file entry (too many columns)" if $morigdest ne '-' && $format == 1; - if ( $mtarget =~ /^PARAM:?/ ) { fatal_error 'PARAM requires that a parameter be supplied in macro invocation' unless $param; $mtarget = substitute_param $param, $mtarget;