Remove BROKEN_ROUTING option

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@8316 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2008-03-20 18:59:46 +00:00
parent e4878466f7
commit c3df5ed89e
3 changed files with 4 additions and 24 deletions

View File

@ -356,7 +356,6 @@ sub initialize() {
DELETE_THEN_ADD => undef,
MULTICAST => undef,
DONT_LOAD => '',
BROKEN_ROUTING => '',
AUTO_COMMENT => '' ,
#
# Packet Disposition
@ -1912,7 +1911,6 @@ sub get_configuration( $ ) {
default_yes_no 'EXPAND_POLICIES' , '';
default_yes_no 'KEEP_RT_TABLES' , '';
default_yes_no 'DELETE_THEN_ADD' , 'Yes';
default_yes_no 'BROKEN_ROUTING' , '';
default_yes_no 'AUTO_COMMENT' , 'Yes';
default_yes_no 'MULTICAST' , '';
default_yes_no 'MARK_IN_FORWARD_CHAIN' , '';

View File

@ -339,12 +339,7 @@ sub add_a_provider( $$$$$$$$ ) {
if ( $gateway ) {
$address = get_interface_address $interface unless $address;
if ( $config{BROKEN_ROUTING} ) {
emit "qt ip route delete $gateway table $number";
emit "run_ip route add $gateway src $address dev $interface ${mtu}table $number $realm";
} else {
emit "run_ip route replace $gateway src $address dev $interface ${mtu}table $number $realm";
}
emit "run_ip route replace $gateway src $address dev $interface ${mtu}table $number $realm";
emit "run_ip route add default via $gateway src $address dev $interface ${mtu}table $number $realm";
}
@ -516,14 +511,8 @@ sub setup_providers() {
if ( $balance ) {
emit ( 'if [ -n "$DEFAULT_ROUTE" ]; then' );
if ( $config{BROKEN_ROUTING} ) {
emit( ' run_ip route del default' );
emit( ' run_ip route add default scope global $DEFAULT_ROUTE' );
} else {
emit( ' run_ip route replace default scope global $DEFAULT_ROUTE' );
}
emit ( " progress_message \"Default route '\$(echo \$DEFAULT_ROUTE | sed 's/\$\\s*//')' Added\"",
emit ( ' run_ip route replace default scope global $DEFAULT_ROUTE',
" progress_message \"Default route '\$(echo \$DEFAULT_ROUTE | sed 's/\$\\s*//')' Added\"",
'else',
' error_message "WARNING: No Default route added (all \'balance\' providers are down)"',
' restore_default_route',

View File

@ -76,14 +76,7 @@ sub setup_one_proxy_arp( $$$$$ ) {
}
unless ( $haveroute ) {
if ( $config{BROKEN_ROUTING} ) {
emit "[ -n \"\$NOROUTES\" ] || qt ip route del $address";
emit "[ -n \"\$NOROUTES\" ] || run_ip route add $address dev $interface";
} else {
emit "[ -n \"\$NOROUTES\" ] || run_ip route replace $address dev $interface";
}
emit "[ -n \"\$NOROUTES\" ] || run_ip route replace $address dev $interface";
$haveroute = 1 if $persistent;
}