From 393673a8843762de5b60348c76b523408daf54b2 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Fri, 25 Sep 2009 16:15:56 -0400 Subject: [PATCH] Allow MARK in action body -- take 2 --- Shorewall/Perl/Shorewall/Actions.pm | 8 ++++---- Shorewall/changelog.txt | 2 ++ Shorewall/releasenotes.txt | 4 ++++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Actions.pm b/Shorewall/Perl/Shorewall/Actions.pm index db042dc15..bc813d2d5 100644 --- a/Shorewall/Perl/Shorewall/Actions.pm +++ b/Shorewall/Perl/Shorewall/Actions.pm @@ -586,7 +586,7 @@ sub process_actions2 () { # # This function is called to process each rule generated from an action file. # -sub process_action( $$$$$$$$$$ ) { +sub process_action( $$$$$$$$$$$ ) { my ($chainref, $actionname, $target, $source, $dest, $proto, $ports, $sports, $rate, $user, $mark ) = @_; my ( $action , $level ) = split_action $target; @@ -638,7 +638,7 @@ sub process_macro3( $$$$$$$$$$$$ ) { my ( $mtarget, $msource, $mdest, $mproto, $mports, $msports, $morigdest, $mrate, $muser, $mmark ); if ( $format == 1 ) { - ( $mtarget, $msource, $mdest, $mproto, $mports, $msports, $mrate, $muser ) = split_line1 1, 'macro file', $macro_commands; + ( $mtarget, $msource, $mdest, $mproto, $mports, $msports, $mrate, $muser ) = split_line1 1, 8, 'macro file', $macro_commands; $morigdest = '-'; $mmark = '-'; } else { @@ -698,7 +698,7 @@ sub process_macro3( $$$$$$$$$$$$ ) { $muser = merge_macro_column $muser, $user; $mmark = merge_macro_column $mmark, $mark; - process_action $chainref, $action, $mtarget, $msource, $mdest, $mproto, $mports, $msports, $mrate, $muser; + process_action $chainref, $action, $mtarget, $msource, $mdest, $mproto, $mports, $msports, $mrate, $muser, $mark; } pop_open; @@ -749,7 +749,7 @@ sub process_action3( $$$$$ ) { if ( $action2type == MACRO ) { process_macro3( $action2, $param, $chainref, $action, $source, $dest, $proto, $ports, $sports, $rate, $user, $mark ); } else { - process_action $chainref, $action, $target2, $source, $dest, $proto, $ports, $sports, $rate, $user; + process_action $chainref, $action, $target2, $source, $dest, $proto, $ports, $sports, $rate, $user, $mark; } } diff --git a/Shorewall/changelog.txt b/Shorewall/changelog.txt index 4b2b62e87..528b66cb0 100644 --- a/Shorewall/changelog.txt +++ b/Shorewall/changelog.txt @@ -30,6 +30,8 @@ Changes in Shorewall 4.4.2 14) Allow per-ip LIMIT to work on ancient iptables releases. +15) Add 'MARK' column to action body. + Changes in Shorewall 4.4.1 1) Deleted extra 'use ...IPAddrs.pm' from Nat.pm. diff --git a/Shorewall/releasenotes.txt b/Shorewall/releasenotes.txt index 86e929bc9..b88595d3c 100644 --- a/Shorewall/releasenotes.txt +++ b/Shorewall/releasenotes.txt @@ -220,6 +220,10 @@ Shorewall 4.4.2 a capabilities file should regenerate that file after installing 4.4.2. +9) One unintended difference between Shorewall-shell and + Shorewall-perl was that Shorewall-perl did not support the MARK + column in action bodies. This has been corrected. + ---------------------------------------------------------------------------- K N O W N P R O B L E M S R E M A I N I N G ----------------------------------------------------------------------------