forked from extern/shorewall_code
Clean up COMMENT feature
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@4654 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
9926048484
commit
8437d79d73
@ -884,10 +884,8 @@ setup_tc1() {
|
||||
expandv mark sources dests proto ports sports user testval length tos
|
||||
if [ "x$mark" = xCOMMENT ]; then
|
||||
if [ -n "$COMMENTS" ]; then
|
||||
echo $sources $dests $proto $ports $sports $user $testval $length $tos | while read COMMENT; do
|
||||
save_command COMMENT=\"$COMMENT\"
|
||||
done
|
||||
comment=Yes
|
||||
comment=$(echo $sources $dests $proto $ports $sports $user $testval $length $tos)
|
||||
save_command COMMENT=\"${comment% }\"
|
||||
else
|
||||
error_message "COMMENT ignored -- requires comment support in iptables/Netfilter"
|
||||
fi
|
||||
@ -1023,11 +1021,8 @@ __EOF__
|
||||
while read mark sources dests proto ports sports user testval; do
|
||||
if [ "x$mark" = xCOMMENT ]; then
|
||||
if [ -n "$COMMENTS" ]; then
|
||||
[ -n "$COMMENTS" ] || fatal_error "COMMENT requires comment support in iptables/Netfilter"
|
||||
echo $sources $dests $proto $ports $sports $user $testval $length $tos | while read COMMENT; do
|
||||
save_command COMMENT=\"$COMMENT\"
|
||||
done
|
||||
comment=Yes
|
||||
comment=$(echo $sources $dests $proto $ports $sports $user $testval $length $tos)
|
||||
save_command COMMENT=\"${comment% }\"
|
||||
else
|
||||
error_message "COMMENT ignored -- requires comment support in iptables/Netfilter"
|
||||
fi
|
||||
@ -2753,10 +2748,8 @@ process_rules()
|
||||
;;
|
||||
COMMENT)
|
||||
if [ -n "$COMMENTS" ]; then
|
||||
echo $xclients $xservers $xprotocol $xports $xcports $xaddress $xratelimit $xuserspec | while read COMMENT; do
|
||||
save_command COMMENT=\"$COMMENT\"
|
||||
done
|
||||
comment=Yes
|
||||
comment=$(echo $xclients $xservers $xprotocol $xports $xcports $xaddress $xratelimit $xuserspec)
|
||||
save_command COMMENT=\"${comment% }\"
|
||||
else
|
||||
error_message "COMMENT ignored -- requires comment support in iptables/Netfilter"
|
||||
fi
|
||||
|
@ -435,10 +435,8 @@ __EOF__
|
||||
if [ -n "$NAT_ENABLED" ]; then
|
||||
if [ "x$fullinterface" = xCOMMENT ]; then
|
||||
if [ -n "$COMMENTS" ]; then
|
||||
echo $networks $addresses $proto $ports $ipsec | while read COMMENT; do
|
||||
save_command COMMENT=\"$COMMENT\"
|
||||
done
|
||||
comment=Yes
|
||||
comment=$(echo $networks $addresses $proto $ports $ipsec)
|
||||
save_command COMMENT=\"${comment% }\"
|
||||
else
|
||||
error_message "COMMENT ignored -- requires comment support in iptables/Netfilter"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user