mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-25 15:48:56 +01:00
Additional change to copy blackhole routes.
- Add 'blackhole' to the outer case statement - Add RFC1918 blackhole routes before starting providers. Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
06e7f297f7
commit
5aa731e963
@ -252,6 +252,9 @@ sub copy_and_edit_table( $$$$ ) {
|
|||||||
emit ( ' case $net in',
|
emit ( ' case $net in',
|
||||||
' default)',
|
' default)',
|
||||||
' ;;',
|
' ;;',
|
||||||
|
' blackhole)',
|
||||||
|
" run_ip route add table $number blackhole \$route $realm",
|
||||||
|
' ;;',
|
||||||
' *)',
|
' *)',
|
||||||
' case $(find_device $route) in',
|
' case $(find_device $route) in',
|
||||||
" $copy)" );
|
" $copy)" );
|
||||||
@ -269,9 +272,6 @@ sub copy_and_edit_table( $$$$ ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
emit ( ' ;;',
|
emit ( ' ;;',
|
||||||
' *)',
|
|
||||||
" [ \$net = blackhole ] && run_ip route add table $number \$net \$route $realm",
|
|
||||||
' ;;',
|
|
||||||
' esac',
|
' esac',
|
||||||
' ;;',
|
' ;;',
|
||||||
' esac',
|
' esac',
|
||||||
@ -1456,6 +1456,8 @@ sub setup_providers() {
|
|||||||
|
|
||||||
start_providers;
|
start_providers;
|
||||||
|
|
||||||
|
setup_null_routing if $config{NULL_ROUTE_RFC1918};
|
||||||
|
|
||||||
emit '';
|
emit '';
|
||||||
|
|
||||||
emit "start_$providers{$_}->{what}_$_" for @providers;
|
emit "start_$providers{$_}->{what}_$_" for @providers;
|
||||||
@ -1464,7 +1466,6 @@ sub setup_providers() {
|
|||||||
|
|
||||||
finish_providers;
|
finish_providers;
|
||||||
|
|
||||||
setup_null_routing if $config{NULL_ROUTE_RFC1918};
|
|
||||||
emit "\nrun_ip route flush cache";
|
emit "\nrun_ip route flush cache";
|
||||||
|
|
||||||
pop_indent;
|
pop_indent;
|
||||||
|
Loading…
Reference in New Issue
Block a user