diff --git a/Shorewall/Perl/Shorewall/Chains.pm b/Shorewall/Perl/Shorewall/Chains.pm index fb58bd4ad..a9a3fefeb 100644 --- a/Shorewall/Perl/Shorewall/Chains.pm +++ b/Shorewall/Perl/Shorewall/Chains.pm @@ -8073,11 +8073,7 @@ sub save_docker_rules($) { qq( [ -n "\$g_dockernetwork" ] && $tool -t filter -S DOCKER-ISOLATION | tail -n +2 > \${VARDIR}/.filter_DOCKER-ISOLATION) ); - if ( known_interface( 'docker0' ) ) { - emit( qq( $tool -t filter -S FORWARD | grep '^-A FORWARD.*[io] br-[a-z0-9]\\{12\\}' > \${VARDIR}/.filter_FORWARD) ); - } else { - emit( qq( $tool -t filter -S FORWARD | egrep '^-A FORWARD.*[io] (docker0|br-[a-z0-9]{12})' > \${VARDIR}/.filter_FORWARD) ); - } + emit( qq( $tool -t filter -S FORWARD | grep '^-A FORWARD.*[io] br-[a-z0-9]\\{12\\}' > \${VARDIR}/.filter_FORWARD) ); emit( qq( [ -s \${VARDIR}/.filter_FORWARD ] || rm -f \${VARDIR}/.filter_FORWARD), qq(else), @@ -8123,7 +8119,6 @@ else rm -f \${VARDIR}/.dynamic fi EOF - emit(''), save_docker_rules( $tool ) if $config{DOCKER}; } else { emit <<"EOF"; if chain_exists 'UPnP -t nat'; then @@ -8155,12 +8150,11 @@ rm -f \${VARDIR}/.UPnP rm -f \${VARDIR}/.forwardUPnP EOF - emit( '' ), save_docker_rules( $tool ) if $config{DOCKER}; - pop_indent; emit ( 'fi' , '' ); + emit( '' ), save_docker_rules( $tool ), emit( '' ) if $config{DOCKER}; } sub ensure_ipset( $ ) {