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
|
expandv mark sources dests proto ports sports user testval length tos
|
||||||
if [ "x$mark" = xCOMMENT ]; then
|
if [ "x$mark" = xCOMMENT ]; then
|
||||||
if [ -n "$COMMENTS" ]; then
|
if [ -n "$COMMENTS" ]; then
|
||||||
echo $sources $dests $proto $ports $sports $user $testval $length $tos | while read COMMENT; do
|
comment=$(echo $sources $dests $proto $ports $sports $user $testval $length $tos)
|
||||||
save_command COMMENT=\"$COMMENT\"
|
save_command COMMENT=\"${comment% }\"
|
||||||
done
|
|
||||||
comment=Yes
|
|
||||||
else
|
else
|
||||||
error_message "COMMENT ignored -- requires comment support in iptables/Netfilter"
|
error_message "COMMENT ignored -- requires comment support in iptables/Netfilter"
|
||||||
fi
|
fi
|
||||||
@ -1023,11 +1021,8 @@ __EOF__
|
|||||||
while read mark sources dests proto ports sports user testval; do
|
while read mark sources dests proto ports sports user testval; do
|
||||||
if [ "x$mark" = xCOMMENT ]; then
|
if [ "x$mark" = xCOMMENT ]; then
|
||||||
if [ -n "$COMMENTS" ]; then
|
if [ -n "$COMMENTS" ]; then
|
||||||
[ -n "$COMMENTS" ] || fatal_error "COMMENT requires comment support in iptables/Netfilter"
|
comment=$(echo $sources $dests $proto $ports $sports $user $testval $length $tos)
|
||||||
echo $sources $dests $proto $ports $sports $user $testval $length $tos | while read COMMENT; do
|
save_command COMMENT=\"${comment% }\"
|
||||||
save_command COMMENT=\"$COMMENT\"
|
|
||||||
done
|
|
||||||
comment=Yes
|
|
||||||
else
|
else
|
||||||
error_message "COMMENT ignored -- requires comment support in iptables/Netfilter"
|
error_message "COMMENT ignored -- requires comment support in iptables/Netfilter"
|
||||||
fi
|
fi
|
||||||
@ -2753,10 +2748,8 @@ process_rules()
|
|||||||
;;
|
;;
|
||||||
COMMENT)
|
COMMENT)
|
||||||
if [ -n "$COMMENTS" ]; then
|
if [ -n "$COMMENTS" ]; then
|
||||||
echo $xclients $xservers $xprotocol $xports $xcports $xaddress $xratelimit $xuserspec | while read COMMENT; do
|
comment=$(echo $xclients $xservers $xprotocol $xports $xcports $xaddress $xratelimit $xuserspec)
|
||||||
save_command COMMENT=\"$COMMENT\"
|
save_command COMMENT=\"${comment% }\"
|
||||||
done
|
|
||||||
comment=Yes
|
|
||||||
else
|
else
|
||||||
error_message "COMMENT ignored -- requires comment support in iptables/Netfilter"
|
error_message "COMMENT ignored -- requires comment support in iptables/Netfilter"
|
||||||
fi
|
fi
|
||||||
|
@ -435,10 +435,8 @@ __EOF__
|
|||||||
if [ -n "$NAT_ENABLED" ]; then
|
if [ -n "$NAT_ENABLED" ]; then
|
||||||
if [ "x$fullinterface" = xCOMMENT ]; then
|
if [ "x$fullinterface" = xCOMMENT ]; then
|
||||||
if [ -n "$COMMENTS" ]; then
|
if [ -n "$COMMENTS" ]; then
|
||||||
echo $networks $addresses $proto $ports $ipsec | while read COMMENT; do
|
comment=$(echo $networks $addresses $proto $ports $ipsec)
|
||||||
save_command COMMENT=\"$COMMENT\"
|
save_command COMMENT=\"${comment% }\"
|
||||||
done
|
|
||||||
comment=Yes
|
|
||||||
else
|
else
|
||||||
error_message "COMMENT ignored -- requires comment support in iptables/Netfilter"
|
error_message "COMMENT ignored -- requires comment support in iptables/Netfilter"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user