On 03/24/2013 08:51 PM, Tom Eastep wrote: > On 03/24/2013 08:25 PM, Mr Dash Four wrote: >> >>>> See my previous post on my thoughts on this. >>>> >>> >>> I've reverted that change for RC 1. >>> >> Thanks! If you send me the appropriate patch(es), I'll test this >> tomorrow as well when I get back. > > The patch is at > http://sourceforge.net/p/shorewall/code/ci/6e5f00062cc1ef81bcafd9d9704bb0b9a6509475/ > > Byt it also reverts the updates to the MultiISP documentation.
Here's the patch extracted from that web page. Also attached is a patch that cleans up a few more cases of table numbers/names and 'route replace'. -Tom -- Tom Eastep \ When I die, I want to go like my Grandfather who Shoreline, \ died peacefully in his sleep. Not screaming like Washington, USA \ all of the passengers in his car http://shorewall.net \________________________________________________
--- a/Shorewall/Perl/Shorewall/Providers.pm +++ b/Shorewall/Perl/Shorewall/Providers.pm @@ -1172,18 +1172,18 @@ if ( $gateway ne '-' ) { if ( $device ne '-' ) { - push @$routes, qq(run_ip route replace $dest via $gateway dev $physical table $id); + push @$routes, qq(run_ip route add $dest via $gateway dev $physical table $id); push @$routes, q(echo "$IP ) . qq(-$family route del $dest via $gateway dev $physical table $id > /dev/null 2>&1" >> \${VARDIR}/undo_${provider}_routing) if $number >= DEFAULT_TABLE; } elsif ( $null ) { - push @$routes, qq(run_ip route replace $null $dest table $id); + push @$routes, qq(run_ip route add $null $dest table $id); push @$routes, q(echo "$IP ) . qq(-$family route del $null $dest table $id > /dev/null 2>&1" >> \${VARDIR}/undo_${provider}_routing) if $number >= DEFAULT_TABLE; } else { - push @$routes, qq(run_ip route replace $dest via $gateway table $id); + push @$routes, qq(run_ip route add $dest via $gateway table $id); push @$routes, q(echo "$IP ) . qq(-$family route del $dest via $gateway table $id > /dev/null 2>&1" >> \${VARDIR}/undo_${provider}_routing) if $number >= DEFAULT_TABLE; } } else { fatal_error "You must specify a device for this route" unless $physical; - push @$routes, qq(run_ip route replace $dest dev $physical table $id); + push @$routes, qq(run_ip route add $dest dev $physical table $id); push @$routes, q(echo "$IP ) . qq(-$family route del $dest dev $physical table $id > /dev/null 2>&1" >> \${VARDIR}/undo_${provider}_routing) if $number >= DEFAULT_TABLE; }
diff --git a/Shorewall/Perl/Shorewall/Providers.pm b/Shorewall/Perl/Shorewall/Providers.pm index 7aadd9c..f90e873 100644 --- a/Shorewall/Perl/Shorewall/Providers.pm +++ b/Shorewall/Perl/Shorewall/Providers.pm @@ -380,7 +380,7 @@ sub start_provider( $$$$$ ) { if ( $number ) { - emit "qt ip -$family route flush table $number"; + emit "qt ip -$family route flush table $id"; emit "echo \"\$IP -$family route flush table $id > /dev/null 2>&1\" > \${VARDIR}/undo_${table}_routing"; } else { emit( "> \${VARDIR}/undo_${table}_routing" ); @@ -791,7 +791,7 @@ CEOF $address = get_interface_address $interface unless $address; if ( $family == F_IPV4 ) { emit "run_ip route replace $gateway src $address dev $physical ${mtu}"; - emit "run_ip route replace $gateway src $address dev $physical ${mtu}table $id $realm"; + emit "run_ip route add $gateway src $address dev $physical ${mtu}table $id $realm"; } else { emit "qt \$IP -6 route add $gateway src $address dev $physical ${mtu}"; emit "qt \$IP -6 route del $gateway src $address dev $physical ${mtu}table $id $realm"; @@ -810,8 +810,8 @@ CEOF emit ''; if ( $gateway ) { if ( $family == F_IPV4 ) { - emit qq(run_ip route replace $gateway/32 dev $physical table $id); - emit qq(run_ip route replace default via $gateway src $address dev $physical table $id metric $number); + emit qq(run_ip route add $gateway/32 dev $physical table $id); + emit qq(run_ip route add default via $gateway src $address dev $physical table $id metric $number); } else { emit qq(qt \$IP -6 route del default via $gateway src $address dev $physical table $id metric $number); emit qq(run_ip route add default via $gateway src $address dev $physical table $id metric $number);
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________ Shorewall-devel mailing list Shorewall-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/shorewall-devel