mirror of
https://gitlab.com/shorewall/code.git
synced 2025-08-16 11:44:28 +02:00
Fix RETAIN_ALIASES=Yes behavior; only 'detect' first address for SNAT
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6149 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
@ -529,16 +529,14 @@ sub generate_script_2 () {
|
||||
''
|
||||
);
|
||||
|
||||
if ( $capabilities{NAT_ENABLED} && ! $config{RETAIN_ALIASES} ) {
|
||||
emitj( '',
|
||||
'if [ -f ${VARDIR}/nat ]; then',
|
||||
if ( $capabilities{NAT_ENABLED} ) {
|
||||
emitj( 'if [ -f ${VARDIR}/nat ]; then',
|
||||
' while read external interface; do',
|
||||
' del_ip_addr $external $interface',
|
||||
' done < ${VARDIR}/nat',
|
||||
'',
|
||||
' rm -f ${VARDIR}/nat',
|
||||
'fi',
|
||||
'' );
|
||||
"fi\n" );
|
||||
}
|
||||
|
||||
emit "delete_tc1\n" if $config{CLEAR_TC};
|
||||
@ -571,7 +569,7 @@ sub generate_script_3() {
|
||||
dump_zone_contents;
|
||||
emit_unindented '__EOF__';
|
||||
|
||||
emit '> ${VARDIR}/nat' unless $config{RETAIN_ALIASES};
|
||||
emit '> ${VARDIR}/nat';
|
||||
|
||||
add_addresses;
|
||||
|
||||
|
Reference in New Issue
Block a user