From d2607cd0da9a6f2822ef8de712efe392a598b85a Mon Sep 17 00:00:00 2001 From: teastep Date: Tue, 10 Oct 2006 01:09:23 +0000 Subject: [PATCH] Improve COMMENT feature git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@4655 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall/compiler | 6 +++--- Shorewall/lib.nat | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Shorewall/compiler b/Shorewall/compiler index 8492fc24a..06d108e9d 100755 --- a/Shorewall/compiler +++ b/Shorewall/compiler @@ -885,7 +885,7 @@ setup_tc1() { if [ "x$mark" = xCOMMENT ]; then if [ -n "$COMMENTS" ]; then comment=$(echo $sources $dests $proto $ports $sports $user $testval $length $tos) - save_command COMMENT=\"${comment% }\" + save_command COMMENT=\"$comment\" else error_message "COMMENT ignored -- requires comment support in iptables/Netfilter" fi @@ -1022,7 +1022,7 @@ __EOF__ if [ "x$mark" = xCOMMENT ]; then if [ -n "$COMMENTS" ]; then comment=$(echo $sources $dests $proto $ports $sports $user $testval $length $tos) - save_command COMMENT=\"${comment% }\" + save_command COMMENT=\"$comment\" else error_message "COMMENT ignored -- requires comment support in iptables/Netfilter" fi @@ -2749,7 +2749,7 @@ process_rules() COMMENT) if [ -n "$COMMENTS" ]; then comment=$(echo $xclients $xservers $xprotocol $xports $xcports $xaddress $xratelimit $xuserspec) - save_command COMMENT=\"${comment% }\" + save_command COMMENT=\"$comment\" else error_message "COMMENT ignored -- requires comment support in iptables/Netfilter" fi diff --git a/Shorewall/lib.nat b/Shorewall/lib.nat index 12642f328..3eeb441dc 100644 --- a/Shorewall/lib.nat +++ b/Shorewall/lib.nat @@ -436,7 +436,7 @@ __EOF__ if [ "x$fullinterface" = xCOMMENT ]; then if [ -n "$COMMENTS" ]; then comment=$(echo $networks $addresses $proto $ports $ipsec) - save_command COMMENT=\"${comment% }\" + save_command COMMENT=\"$comment\" else error_message "COMMENT ignored -- requires comment support in iptables/Netfilter" fi