mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-20 01:37:59 +02:00
Make processing of original dest in Format-1 macros more obvious
This commit is contained in:
parent
57f4458ec9
commit
5793246d7c
@ -638,7 +638,8 @@ sub process_macro3( $$$$$$$$$$$ ) {
|
|||||||
my ( $mtarget, $msource, $mdest, $mproto, $mports, $msports, $morigdest, $mrate, $muser );
|
my ( $mtarget, $msource, $mdest, $mproto, $mports, $msports, $morigdest, $mrate, $muser );
|
||||||
|
|
||||||
if ( $format == 1 ) {
|
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 {
|
} else {
|
||||||
( $mtarget, $msource, $mdest, $mproto, $mports, $msports, $morigdest, $mrate, $muser ) = split_line1 1, 9, 'macro file', $macro_commands;
|
( $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;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
fatal_error "Invalid macro file entry (too many columns)" if $morigdest ne '-' && $format == 1;
|
|
||||||
|
|
||||||
if ( $mtarget =~ /^PARAM:?/ ) {
|
if ( $mtarget =~ /^PARAM:?/ ) {
|
||||||
fatal_error 'PARAM requires that a parameter be supplied in macro invocation' unless $param;
|
fatal_error 'PARAM requires that a parameter be supplied in macro invocation' unless $param;
|
||||||
$mtarget = substitute_param $param, $mtarget;
|
$mtarget = substitute_param $param, $mtarget;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user