Lines 8762-8769
sub save_docker_rules($) {
Link Here
|
8762 |
|
8762 |
|
8763 |
emit( qq(if [ -n "\$g_docker" ]; then), |
8763 |
emit( qq(if [ -n "\$g_docker" ]; then), |
8764 |
qq( $tool -t nat -S DOCKER | tail -n +2 > \${VARDIR}/.nat_DOCKER), |
8764 |
qq( $tool -t nat -S DOCKER | tail -n +2 > \${VARDIR}/.nat_DOCKER), |
8765 |
qq( $tool -t nat -S OUTPUT | tail -n +2 | fgrep DOCKER > \${VARDIR}/.nat_OUTPUT), |
8765 |
qq( $tool -t nat -S OUTPUT | tail -n +2 | grep -F DOCKER > \${VARDIR}/.nat_OUTPUT), |
8766 |
qq( $tool -t nat -S POSTROUTING | tail -n +2 | fgrep -v SHOREWALL | fgrep -v LIBVIRT > \${VARDIR}/.nat_POSTROUTING), |
8766 |
qq( $tool -t nat -S POSTROUTING | tail -n +2 | grep -F -v SHOREWALL | grep -F -v LIBVIRT > \${VARDIR}/.nat_POSTROUTING), |
8767 |
qq( $tool -t filter -S DOCKER | tail -n +2 > \${VARDIR}/.filter_DOCKER), |
8767 |
qq( $tool -t filter -S DOCKER | tail -n +2 > \${VARDIR}/.filter_DOCKER), |
8768 |
qq( rm -f \${VARDIR}/.filter_DOCKER-*), |
8768 |
qq( rm -f \${VARDIR}/.filter_DOCKER-*), |
8769 |
qq( [ -n "\$g_dockeringress" ] && $tool -t filter -S DOCKER-INGRESS | tail -n +2 > \${VARDIR}/.filter_DOCKER-INGRESS), |
8769 |
qq( [ -n "\$g_dockeringress" ] && $tool -t filter -S DOCKER-INGRESS | tail -n +2 > \${VARDIR}/.filter_DOCKER-INGRESS), |
Lines 8780-8786
sub save_docker_rules($) {
Link Here
|
8780 |
if ( known_interface( $bridge ) ) { |
8780 |
if ( known_interface( $bridge ) ) { |
8781 |
emit( qq( $tool -t filter -S FORWARD | grep '^-A FORWARD.*[io] br-[a-z0-9]\\{12\\}' > \${VARDIR}/.filter_FORWARD) ); |
8781 |
emit( qq( $tool -t filter -S FORWARD | grep '^-A FORWARD.*[io] br-[a-z0-9]\\{12\\}' > \${VARDIR}/.filter_FORWARD) ); |
8782 |
} else { |
8782 |
} else { |
8783 |
emit( qq( $tool -t filter -S FORWARD | egrep '^-A FORWARD.*[io] ($bridge|br-[a-z0-9]{12})' > \${VARDIR}/.filter_FORWARD) ); |
8783 |
emit( qq( $tool -t filter -S FORWARD | grep -E '^-A FORWARD.*[io] ($bridge|br-[a-z0-9]{12})' > \${VARDIR}/.filter_FORWARD) ); |
8784 |
} |
8784 |
} |
8785 |
|
8785 |
|
8786 |
emit( q( [ -s ${VARDIR}/.filter_FORWARD ] || rm -f ${VARDIR}/.filter_FORWARD), |
8786 |
emit( q( [ -s ${VARDIR}/.filter_FORWARD ] || rm -f ${VARDIR}/.filter_FORWARD), |
Lines 8825-8831
else
Link Here
|
8825 |
fi |
8825 |
fi |
8826 |
|
8826 |
|
8827 |
if chain_exists dynamic; then |
8827 |
if chain_exists dynamic; then |
8828 |
$tool -S dynamic | tail -n +2 | fgrep -v -- '-j ACCEPT' > \${VARDIR}/.dynamic |
8828 |
$tool -S dynamic | tail -n +2 | grep -F -v -- '-j ACCEPT' > \${VARDIR}/.dynamic |
8829 |
else |
8829 |
else |
8830 |
rm -f \${VARDIR}/.dynamic |
8830 |
rm -f \${VARDIR}/.dynamic |
8831 |
fi |
8831 |
fi |