mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-23 16:13:18 +01:00
Restore missing function merge_macro_source_dest()
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5449 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
88d4e425b2
commit
052739fcfd
@ -2,6 +2,8 @@ Changes in 3.4.0 Final
|
||||
|
||||
1) Add missing logic for "!" rules.
|
||||
|
||||
2) Restore missing function merge_macro_source_dest.
|
||||
|
||||
Changes in 3.4.0 RC 3
|
||||
|
||||
1) Add warning about 'loose' and 'balance'
|
||||
|
@ -2068,6 +2068,27 @@ process_ratelimit() {
|
||||
fi
|
||||
}
|
||||
|
||||
#
|
||||
# Combine a source/dest from the macro body with one from the macro invocation
|
||||
#
|
||||
merge_macro_source_dest() # $1 = source/dest from macro body, $2 = source/dest from invocation
|
||||
{
|
||||
case $2 in
|
||||
-)
|
||||
echo ${1}
|
||||
;;
|
||||
*.*.*|+*|~*|!~*)
|
||||
#
|
||||
# Value in the invocation is an address -- put it behind the value from the macro
|
||||
#
|
||||
echo ${1}:${2}
|
||||
;;
|
||||
*)
|
||||
echo ${2}:${1}
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
#
|
||||
# Process a record from the rules file
|
||||
#
|
||||
|
@ -540,8 +540,6 @@ merge_levels() # $1=level at which superior action is called, $2=level at which
|
||||
# c) A dependency graph is created. For each <action>, the variable 'requiredby_<action>' lists the
|
||||
# action[:level[:tag]] of each action invoked by <action>.
|
||||
# d) All actions are listed in the global variable ACTIONS.
|
||||
# e) Common actions are recorded (in variables of the name <policy>_common) and are added to the global
|
||||
# USEDACTIONS
|
||||
#
|
||||
# As the rules file is scanned, each action[:level[:tag]] is merged onto the USEDACTIONS list. When an <action>
|
||||
# is merged onto this list, its action chain is created. Where logging is specified, a chain with the name
|
||||
|
@ -506,7 +506,7 @@ setup_nat() {
|
||||
addnatrule nat_out -s $internal $policyout -j SNAT --to-source $external
|
||||
else
|
||||
addnatrule $(input_chain $iface) -d $external $policyin -j DNAT --to-destination $internal
|
||||
addnatrule $(output_chain $iface) -s $internal $policyout -j SNAT --to-source $external
|
||||
addnatrule $(output_chain $iface) -s $internal $policyout -j SNAT --to-source $external
|
||||
fi
|
||||
|
||||
[ -n "$localnat" ] && \
|
||||
|
@ -34,6 +34,11 @@ Problems Corrected in 3.4.0 Final.
|
||||
exempt the rule from being suppressed by OPTIMIZE=1. That feature
|
||||
was not working.
|
||||
|
||||
2) If both a macro body and a macro invocation contained an entry in the
|
||||
SOURCE or DEST column, then compilation failed with the error:
|
||||
|
||||
merge_macro_source_dest: command not found
|
||||
|
||||
Migration Considerations:
|
||||
|
||||
If you are migrating from a Shorewall version earlier than 3.2.0 then
|
||||
|
Loading…
Reference in New Issue
Block a user