Localize to IPv6 the effect of generating ALL_ACASTS during 'restore'

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2020-09-11 13:44:57 -07:00
parent 4385264dc3
commit b253be8a69
No known key found for this signature in database
GPG Key ID: 96E6B3F2423A4D10
3 changed files with 9 additions and 8 deletions

View File

@ -7513,11 +7513,12 @@ sub set_global_variables( $$ ) {
}
if ( $setall ) {
emit $interfaceaddr{$_} for sortkeysiftest %interfaceaddr;
emit $interfacenets{$_} for sortkeysiftest %interfacenets;
if ( $conditional ) {
emit $interfaceaddr{$_} for sortkeysiftest %interfaceaddr;
emit $interfacenets{$_} for sortkeysiftest %interfacenets;
}
unless ( have_capability( 'ADDRTYPE' ) ) {
if ( $family == F_IPV4 ) {
emit 'ALL_BCASTS="$(get_all_bcasts) 255.255.255.255"';
emit $interfacebcasts{$_} for sortkeysiftest %interfacebcasts;

View File

@ -291,13 +291,14 @@ sub generate_script_2() {
if ( have_address_variables || @$optional_interfaces ) {
emit( 'local interface',
'local iface',
'',
'interface="$1"',
''
);
}
emit( 'local iface', '' ) if $family == F_IPV6;
map_provider_to_interface if have_providers;
if ( $global_variables ) {
@ -314,7 +315,7 @@ sub generate_script_2() {
if ( $global_variables == ( ALL_COMMANDS | NOT_RESTORE ) ) {
verify_required_interfaces(0);
set_global_variables($family == F_IPV4, 0);
set_global_variables($family == F_IPV6, 0);
handle_optional_interfaces;
}

View File

@ -2437,10 +2437,9 @@ sub generate_all_acasts() {
@wildacasts = '*' unless @wildacasts;
emit( '',
'ALL_ACASTS=',
emit( 'ALL_ACASTS=',
'',
'for $iface in $(find_all_interfaces1); do' );
'for iface in $(find_all_interfaces1); do' );
push_indent;