[Openswan dev] Openswan 2.3.0 multiple defaultroute patch

Paul Wouters paul at xelerance.com
Thu Feb 3 02:17:21 CET 2005


On Tue, 1 Feb 2005, Dirk Nehring wrote:

> unfortunately, Openswan does not support multiple defaultroutes. Since
> 2.6 it is not a principle problem to route ESP packets via more than one
> defaultroute. Here is my first patch for inclusion, if you like it,
> please apply.
>
> --------------------------------------------------
> diff -ur openswan-2.2.0.orig/programs/_startklips/_startklips.in openswan-2.2.0/programs/_startklips/_startklips.in
> --- openswan-2.2.0.orig/programs/_startklips/_startklips.in     2004-07-15 04:34:42.000000000 +0200
> +++ openswan-2.2.0/programs/_startklips/_startklips.in  2004-11-26 13:21:37.142594304 +0100
> @@ -192,7 +192,7 @@
> # interfaces=%defaultroute:  put ipsec0 on top of default route's interface
> defaultinterface() {
>        phys=`netstat -nr |
> -               awk '$1 == "0.0.0.0" && $3 == "0.0.0.0" { print $NF }'`
> +               awk '$1 == "0.0.0.0" && $3 == "0.0.0.0" { print $NF }' | head -1`
>        if test " $phys" = " "
>        then
>                echo "no default route, %defaultroute cannot cope!!!"

That however breaks klips.

This whole part needs to be rewritten to use ip rule (source routing) anyway.

But I am not sure how you handle more default routes. Do you have one interface
with multiple default gateways? Or multiple interfaces with their own IP address
and a default route? Because the latter wouldn't work if one default route
vanished, since it would take down the IP address as well.

Paul

>
> Regards,
>
> Dirk Nehring
> _______________________________________________
> Dev mailing list
> Dev at openswan.org
> http://lists.openswan.org/mailman/listinfo/dev
>

-- 

"At best it is a theory, at worst a fantasy" -- Michael Crichton



More information about the Dev mailing list